summaryrefslogtreecommitdiffstats
path: root/markup/goldmark/convert_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/goldmark/convert_test.go')
-rw-r--r--markup/goldmark/convert_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/markup/goldmark/convert_test.go b/markup/goldmark/convert_test.go
index 3c173fb0a..31799b2a5 100644
--- a/markup/goldmark/convert_test.go
+++ b/markup/goldmark/convert_test.go
@@ -178,6 +178,21 @@ func TestConvertAutoIDAsciiOnly(t *testing.T) {
c.Assert(got, qt.Contains, "<h2 id=\"god-is-good-\">")
}
+func TestConvertAutoIDBlackfriday(t *testing.T) {
+ c := qt.New(t)
+
+ content := `
+## Let's try this, shall we?
+
+`
+ mconf := markup_config.Default
+ mconf.Goldmark.Parser.AutoHeadingIDType = goldmark_config.AutoHeadingIDTypeBlackfriday
+ b := convert(c, mconf, content)
+ got := string(b.Bytes())
+
+ c.Assert(got, qt.Contains, "<h2 id=\"let-s-try-this-shall-we\">")
+}
+
func TestCodeFence(t *testing.T) {
c := qt.New(t)