Skip to content

Commit 07cb946

Browse files
alecthomasclaude
andcommitted
docs: document StandardTypes parent-class fallback
Several token types intentionally have no entry and inherit their parent's CSS class; state that so the gaps are not mistaken for omissions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6a26849 commit 07cb946

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ const (
221221
)
222222

223223
var (
224+
// StandardTypes maps token types to their short CSS class names.
225+
//
226+
// Token types deliberately absent from this map (e.g. NameKeyword,
227+
// LiteralStringAtom) inherit the class of their sub-category or
228+
// category via Lookup; formatters should resolve classes through that
229+
// fallback rather than expecting an entry for every TokenType.
224230
StandardTypes = map[TokenType]string{
225231
Background: "bg",
226232
PreWrapper: "chroma",

0 commit comments

Comments
 (0)