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
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-03-20 18:36:30 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-03-20 21:15:11 +0300
commitb725253f9e3033e18bd45096c0622e6fb7b1ff79 (patch)
treea88ffca6a7cddf39df8921a862331a4a917fd8f1 /markup/goldmark/convert_test.go
parent35dedf15c04a605df4d4a09263b0b299e5161f86 (diff)
Attributes for code fences should be placed after the lang indicator only
Fixes #8313
Diffstat (limited to 'markup/goldmark/convert_test.go')
-rw-r--r--markup/goldmark/convert_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/markup/goldmark/convert_test.go b/markup/goldmark/convert_test.go
index c7367dd01..2b66a1910 100644
--- a/markup/goldmark/convert_test.go
+++ b/markup/goldmark/convert_test.go
@@ -242,10 +242,20 @@ func TestConvertAttributes(t *testing.T) {
withBlockAttributes(conf)
conf.Highlight.CodeFences = true
},
- "```bash\necho 'foo';\n````\n{.myclass id=\"myid\"}",
+ "```bash {.myclass id=\"myid\"}\necho 'foo';\n````\n",
"<div class=\"highlight myclass\" id=\"myid\"><pre style",
},
{
+ "Code block, CodeFences=true,linenos=table",
+ func(conf *markup_config.Config) {
+ withBlockAttributes(conf)
+ conf.Highlight.CodeFences = true
+ },
+ "```bash {linenos=table .myclass id=\"myid\"}\necho 'foo';\n````\n{ .adfadf }",
+ []string{"div class=\"highlight myclass\" id=\"myid\"><div s",
+ "table style"},
+ },
+ {
"Paragraph",
withBlockAttributes,
"\nHi there.\n{.myclass }",