diff options
Diffstat (limited to 'markup/goldmark/codeblocks/integration_test.go')
-rw-r--r-- | markup/goldmark/codeblocks/integration_test.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/markup/goldmark/codeblocks/integration_test.go b/markup/goldmark/codeblocks/integration_test.go index 29ff0dc7d..7f0201878 100644 --- a/markup/goldmark/codeblocks/integration_test.go +++ b/markup/goldmark/codeblocks/integration_test.go @@ -18,6 +18,8 @@ import ( "strings" "testing" + qt "github.com/frankban/quicktest" + "github.com/gohugoio/hugo/hugolib" ) @@ -384,3 +386,40 @@ Common } } + +// Issue 10835 +func TestAttributesValidation(t *testing.T) { + t.Parallel() + + files := ` +-- hugo.toml -- +disableKinds = ["taxonomy", "term"] +-- content/p1.md -- +--- +title: "p1" +--- + +## Issue 10835 + +§§§bash { color=red dimensions=300x200 } +Hello, World! +§§§ + +-- layouts/index.html -- +-- layouts/_default/single.html -- +{{ .Content }} +-- layouts/_default/_markup/render-codeblock.html -- +Attributes: {{ .Attributes }}|Type: {{ .Type }}| +` + + b, err := hugolib.NewIntegrationTestBuilder( + hugolib.IntegrationTestConfig{ + T: t, + TxtarString: files, + }, + ).BuildE() + + b.Assert(err, qt.Not(qt.IsNil)) + b.Assert(err.Error(), qt.Contains, "p1.md:7:9\": failed to parse Markdown attributes; you may need to quote the values") + +} |