diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-03-02 10:44:29 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-03-02 12:30:35 +0100 |
commit | 0327da050f809ff6502ef611a0f77a962dbc8a4b (patch) | |
tree | e4d681bb33d70b281026cb4cfb97016dcb70364b /tpl | |
parent | 9b8b6d34e2d039bfc040fd865a2e77ce2c278587 (diff) | |
download | hugo-0327da050f809ff6502ef611a0f77a962dbc8a4b.tar.gz hugo-0327da050f809ff6502ef611a0f77a962dbc8a4b.zip |
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.go | 3 |
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=" < "></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) |