Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-02 12:44:29 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-02 14:30:35 +0300
commit0327da050f809ff6502ef611a0f77a962dbc8a4b (patch)
treee4d681bb33d70b281026cb4cfb97016dcb70364b /tpl
parent9b8b6d34e2d039bfc040fd865a2e77ce2c278587 (diff)
tpl/transform: Fix it when template.HTML is passes as option to Hightlight
Fixes #9591
Diffstat (limited to 'tpl')
-rw-r--r--tpl/transform/transform_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tpl/transform/transform_test.go b/tpl/transform/transform_test.go
index 289674bf1..e52e0046d 100644
--- a/tpl/transform/transform_test.go
+++ b/tpl/transform/transform_test.go
@@ -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=" &lt; "></Foo>`, "xml", "", `&amp;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)