diff options
Diffstat (limited to 'markup/goldmark/convert_test.go')
-rw-r--r-- | markup/goldmark/convert_test.go | 15 |
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 = "«" + mconf.Goldmark.Extensions.Typographer.RightDoubleQuote = "»" + b := convert(c, mconf, content) + got := string(b.Bytes()) + + c.Assert(got, qt.Contains, "<p>A «quote» and ‘another quote’ and a «quote with a ’nested’ quote» and a ‘quote with a «nested» quote’ and an ellipsis…</p>\n") +} |