mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
tpl/transform: Fix it when template.HTML is passes as option to Hightlight
Fixes #9591
This commit is contained in:
@@ -15,6 +15,7 @@ package transform_test
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gohugoio/hugo/common/loggers"
|
||||
@@ -81,6 +82,8 @@ func TestHighlight(t *testing.T) {
|
||||
// Issue #4179
|
||||
{`<Foo attr=" < "></Foo>`, "xml", "", `&lt;`},
|
||||
{tstNoStringer{}, "go", "", false},
|
||||
// Issue #9591
|
||||
{strings.Repeat("AAA \n", 10), "bash", template.HTML("linenos=true,noClasses=false"), "line"},
|
||||
} {
|
||||
|
||||
result, err := ns.Highlight(test.s, test.lang, test.opts)
|
||||
|
Reference in New Issue
Block a user