aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_paragraph_test.go
blob: ab3ab6c5b8cfa0019d7a8b6ed157974e88767d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package markdown

import "testing"

func TestParagraph(t *testing.T) {
	t.Run("paragraph", func(t *testing.T) {
		t.Run("simple", test("bonsoir", `<p>bonsoir</p>`))
	})
	t.Run("replacer", func(t *testing.T) {
		opt := &Option{
			Replaces: map[rune]string{'~': "&thinsp;"},
		}
		t.Run("empty", testWithOptions(opt, "bonsoir", `<p>bonsoir</p>`))
		t.Run("simple", testWithOptions(opt, "bonsoir~!", `<p>bonsoir&thinsp;!</p>`))
	})
}