diff --git a/inline_test.go b/inline_test.go index 03af41a..9cd8033 100644 --- a/inline_test.go +++ b/inline_test.go @@ -1026,7 +1026,7 @@ func TestInlineComments(t *testing.T) { "blahblah\n\nrhubarb\n", "

blahblah\n\nrhubarb

\n", } - doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS, HtmlRendererParameters{}) + doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_DASHES, HtmlRendererParameters{}) } func TestSmartDoubleQuotes(t *testing.T) { @@ -1070,3 +1070,41 @@ func TestSmartFractions(t *testing.T) { doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_FRACTIONS, HtmlRendererParameters{}) } + +func TestDisableSmartDashes(t *testing.T) { + doTestsInlineParam(t, []string{ + "foo - bar\n", + "

foo - bar

\n", + "foo -- bar\n", + "

foo -- bar

\n", + "foo --- bar\n", + "

foo --- bar

\n", + }, Options{}, 0, HtmlRendererParameters{}) + doTestsInlineParam(t, []string{ + "foo - bar\n", + "

foo – bar

\n", + "foo -- bar\n", + "

foo — bar

\n", + "foo --- bar\n", + "

foo —– bar

\n", + }, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_DASHES, HtmlRendererParameters{}) + doTestsInlineParam(t, []string{ + "foo - bar\n", + "

foo - bar

\n", + "foo -- bar\n", + "

foo – bar

\n", + "foo --- bar\n", + "

foo — bar

\n", + }, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_LATEX_DASHES|HTML_SMARTYPANTS_DASHES, + HtmlRendererParameters{}) + doTestsInlineParam(t, []string{ + "foo - bar\n", + "

foo - bar

\n", + "foo -- bar\n", + "

foo -- bar

\n", + "foo --- bar\n", + "

foo --- bar

\n", + }, Options{}, + HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_LATEX_DASHES, + HtmlRendererParameters{}) +}