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 647ffce58..e92c651fc 100644
--- a/markup/goldmark/convert_test.go
+++ b/markup/goldmark/convert_test.go
@@ -499,3 +499,18 @@ LINE5
c.Assert(result, qt.Contains, "<span class=\"ln\">2</span><span class=\"cl\">LINE2\n</span></span>")
})
}
+
+func TestTypographerConfig(t *testing.T) {
+ c := qt.New(t)
+
+ content := `
+A "quote" and 'another quote' and a "quote with a 'nested' quote" and a 'quote with a "nested" quote' and an ellipsis...
+`
+ mconf := markup_config.Default
+ mconf.Goldmark.Extensions.Typographer.LeftDoubleQuote = "&laquo;"
+ mconf.Goldmark.Extensions.Typographer.RightDoubleQuote = "&raquo;"
+ b := convert(c, mconf, content)
+ got := string(b.Bytes())
+
+ c.Assert(got, qt.Contains, "<p>A &laquo;quote&raquo; and &lsquo;another quote&rsquo; and a &laquo;quote with a &rsquo;nested&rsquo; quote&raquo; and a &lsquo;quote with a &laquo;nested&raquo; quote&rsquo; and an ellipsis&hellip;</p>\n")
+}