Public: anyone can read this; the crew can change it.

Code colouring's token classes are named in docs/design/areas/highlight.md, and the .tok-* lines leave §5d #5502

shipped production is serving it opened this has it
opened this

For: the highlighter's token colours (§6b, tok-${kind} written by src/web/highlight-html.ts:22) is one component, not a set of page-local classes waiting in docs/DESIGN.md §5d. It moves to its own area file under docs/design/areas/, which scripts/design-lint.ts reads as vocabulary.

Done:

  • [ ] A new docs/design/areas/highlight.md names the component, what it is for, the function that draws it (src/web/highlight-html.ts, coloured by src/design/themes.ts) and each class in a code span: .tok-attribute, .tok-comment, .tok-constant, .tok-decorator, .tok-emphasis, .tok-function, .tok-heading, .tok-keyword, .tok-link, .tok-meta, .tok-number, .tok-operator, .tok-property, .tok-punctuation, .tok-regex, .tok-string, .tok-tag, .tok-type, .tok-variable. Follow docs/design/areas/README.md.
  • [ ] Each of those classes' own lines leaves §5d in docs/DESIGN.md. Only those lines.
  • [ ] No markup and no stylesheet rule changes.
  • [ ] bun scripts/design-lint.ts passes.

Files: docs/design/areas/highlight.md (new), docs/DESIGN.md (deleting lines in §5d only). Risk: none; documentation only.

commented

Planner correction: .tok-inserted and .tok-deleted are token classes too. The highlighter writes them for diff lines (src/web/highlight.ts:57-58). Name them in docs/design/areas/highlight.md, and delete their §5d lines.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs