diff options
Diffstat (limited to 'markdown/ast_paragraph_test.go')
| -rw-r--r-- | markdown/ast_paragraph_test.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/markdown/ast_paragraph_test.go b/markdown/ast_paragraph_test.go index ab3ab6c..c18dfc7 100644 --- a/markdown/ast_paragraph_test.go +++ b/markdown/ast_paragraph_test.go @@ -7,10 +7,18 @@ func TestParagraph(t *testing.T) { t.Run("simple", test("bonsoir", `<p>bonsoir</p>`)) }) t.Run("replacer", func(t *testing.T) { - opt := &Option{ - Replaces: map[rune]string{'~': " "}, - } + opt := &Option{Replaces: map[rune]string{'~': " "}} t.Run("empty", testWithOptions(opt, "bonsoir", `<p>bonsoir</p>`)) t.Run("simple", testWithOptions(opt, "bonsoir~!", `<p>bonsoir !</p>`)) }) + t.Run("poem", func(t *testing.T) { + opt := &Option{Poem: true} + t.Run("simple", testWithOptions(opt, "bonsoir", `<p>bonsoir</p>`)) + t.Run("one_break", testWithOptions(opt, `bonsoir +world`, `<p>bonsoir<br />world</p>`)) + t.Run("mult_break", testWithOptions(opt, `bonsoir +world + +new line`, `<p>bonsoir<br />world</p><p>new line</p>`)) + }) } |
