lineNosKey = "linenos"
hlLinesKey = "hl_lines"
linosStartKey = "linenostart"
- noHlKey = "nohl"
)
var DefaultConfig = Config{
// Use inline CSS styles.
NoClasses bool
- // No highlighting.
- NoHl bool
-
// When set, line numbers will be printed.
LineNos bool
LineNumbersInTable bool
for k, v := range m {
switch k {
- case noHlKey:
- m[noHlKey] = cast.ToBool(v)
case lineNosKey:
if v == "table" || v == "inline" {
m["lineNumbersInTable"] = v == "table"
lexer = chromalexers.Get(lang)
}
- if lexer == nil && (cfg.GuessSyntax && !cfg.NoHl) {
+ if lexer == nil && cfg.GuessSyntax {
lexer = lexers.Analyse(code)
if lexer == nil {
lexer = lexers.Fallback