From 5ff5db6770a4cd7f506121287070fb342de62e79 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sun, 21 Dec 2025 14:16:03 +0100 Subject: feat(markdown): option to render poem --- markdown/ast_paragraph_test.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'markdown/ast_paragraph_test.go') 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", `

bonsoir

`)) }) 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", `

bonsoir

`)) t.Run("simple", testWithOptions(opt, "bonsoir~!", `

bonsoir !

`)) }) + t.Run("poem", func(t *testing.T) { + opt := &Option{Poem: true} + t.Run("simple", testWithOptions(opt, "bonsoir", `

bonsoir

`)) + t.Run("one_break", testWithOptions(opt, `bonsoir +world`, `

bonsoir
world

`)) + t.Run("mult_break", testWithOptions(opt, `bonsoir +world + +new line`, `

bonsoir
world

new line

`)) + }) } -- cgit v1.2.3