diff options
Diffstat (limited to 'markup/blackfriday/renderer.go')
-rw-r--r-- | markup/blackfriday/renderer.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/markup/blackfriday/renderer.go b/markup/blackfriday/renderer.go index 9f4d44e02..a46e46b55 100644 --- a/markup/blackfriday/renderer.go +++ b/markup/blackfriday/renderer.go @@ -30,10 +30,9 @@ type hugoHTMLRenderer struct { // BlockCode renders a given text as a block of code. // Pygments is used if it is setup to handle code fences. func (r *hugoHTMLRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string) { - if r.c.pygmentsCodeFences && (lang != "" || r.c.pygmentsCodeFencesGuessSyntax) { - opts := r.c.pygmentsOptions + if r.c.cfg.MarkupConfig.Highlight.CodeFences { str := strings.Trim(string(text), "\n\r") - highlighted, _ := r.c.cfg.Highlight(str, lang, opts) + highlighted, _ := r.c.cfg.Highlight(str, lang, "") out.WriteString(highlighted) } else { r.Renderer.BlockCode(out, text, lang) |