summaryrefslogtreecommitdiffstats
path: root/markup/goldmark/goldmark_integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/goldmark/goldmark_integration_test.go')
-rw-r--r--markup/goldmark/goldmark_integration_test.go50
1 files changed, 50 insertions, 0 deletions
diff --git a/markup/goldmark/goldmark_integration_test.go b/markup/goldmark/goldmark_integration_test.go
index ffeb763a7..82b41cc67 100644
--- a/markup/goldmark/goldmark_integration_test.go
+++ b/markup/goldmark/goldmark_integration_test.go
@@ -744,3 +744,53 @@ a^*=x-b^*
%!%
`)
}
+
+func TestExtrasExtension(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+disableKinds = ['page','rss','section','sitemap','taxonomy','term']
+[markup.goldmark.extensions.extras.insert]
+enable = false
+[markup.goldmark.extensions.extras.mark]
+enable = false
+[markup.goldmark.extensions.extras.subscript]
+enable = false
+[markup.goldmark.extensions.extras.superscript]
+enable = false
+-- layouts/index.html --
+{{ .Content }}
+-- content/_index.md --
+---
+title: home
+---
+++insert++
+
+==mark==
+
+H~2~0
+
+1^st^
+`
+
+ b := hugolib.Test(t, files)
+
+ b.AssertFileContent("public/index.html",
+ "<p>++insert++</p>",
+ "<p>==mark==</p>",
+ "<p>H~2~0</p>",
+ "<p>1^st^</p>",
+ )
+
+ files = strings.ReplaceAll(files, "enable = false", "enable = true")
+
+ b = hugolib.Test(t, files)
+
+ b.AssertFileContent("public/index.html",
+ "<p><ins>insert</ins></p>",
+ "<p><mark>mark</mark></p>",
+ "<p>H<sub>2</sub>0</p>",
+ "<p>1<sup>st</sup></p>",
+ )
+}