Documentation ¶
Overview ¶
Package internal contains common API functions and structures shared between lexer packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Fallback chroma.Lexer = chroma.MustNewLazyLexer(&chroma.Config{ Name: "fallback", Filenames: []string{"*"}, }, PlaintextRules)
Fallback lexer if no other is found.
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.
func PlaintextRules ¶ added in v0.5.0
PlaintextRules is used for the fallback lexer as well as the explicit plaintext lexer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.