Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Fallback chroma.Lexer = chroma.MustNewLexer(&chroma.Config{ Name: "fallback", Filenames: []string{"*"}, }, PlaintextRules)
Fallback lexer if no other is found.
View Source
var PlaintextRules = chroma.Rules{ "root": []chroma.Rule{ {`.+`, chroma.Text, nil}, {`\n`, chroma.Text, nil}, }, }
Used for the fallback lexer as well as the explicit plaintext lexer
View Source
var Registry = struct { Lexers chroma.Lexers byName map[string]chroma.Lexer byAlias map[string]chroma.Lexer }{ // contains filtered or unexported fields }
Registry of Lexers.
Functions ¶
func MatchMimeType ¶
MatchMimeType attempts to find a lexer for the given MIME type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.