mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Use Chroma as new default syntax highlighter
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config. Fixes #3888
This commit is contained in:
committed by
GitHub
parent
81ed564793
commit
fb33d8286d
@@ -55,7 +55,8 @@ func (ns *Namespace) Highlight(s interface{}, lang, opts string) (template.HTML,
|
||||
return "", err
|
||||
}
|
||||
|
||||
return template.HTML(helpers.Highlight(ns.deps.Cfg, html.UnescapeString(ss), lang, opts)), nil
|
||||
highlighted, _ := ns.deps.ContentSpec.Highlight(html.UnescapeString(ss), lang, opts)
|
||||
return template.HTML(highlighted), nil
|
||||
}
|
||||
|
||||
// HTMLEscape returns a copy of s with reserved HTML characters escaped.
|
||||
|
Reference in New Issue
Block a user