mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 07:00:31 +03:00
parent
46ce1f191b
commit
2db43f841c
3 changed files with 1 additions and 8 deletions
|
@ -168,7 +168,7 @@ func highlight(fw hugio.FlexiWriter, code, lang string, attributes []attributes.
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue