From: Kaushal Modi Date: Thu, 24 Feb 2022 19:12:45 +0000 (-0500) Subject: Add test for line anchor attributes with code fences X-Git-Tag: v0.93.0~26 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6bffcdbd26d90dc4670cdf31f7ee622a297607af;p=brevno-suite%2Fhugo Add test for line anchor attributes with code fences Fixes https://github.com/gohugoio/hugo/issues/9385. --- diff --git a/markup/goldmark/convert_test.go b/markup/goldmark/convert_test.go index ecb308eb..2227d618 100644 --- a/markup/goldmark/convert_test.go +++ b/markup/goldmark/convert_test.go @@ -278,6 +278,16 @@ func TestConvertAttributes(t *testing.T) { "table style", }, }, + { + "Code block, CodeFences=true,lineanchors", + func(conf *markup_config.Config) { + withBlockAttributes(conf) + conf.Highlight.CodeFences = true + conf.Highlight.NoClasses = false + }, + "```bash {linenos=table, anchorlinenos=true, lineanchors=org-coderef--xyz}\necho 'foo';\n```", + "
\n\n
\n
1\n
\n
echo 'foo';\n
\n
\n
", + }, { "Paragraph", withBlockAttributes,