diff options
Diffstat (limited to 'markdown/ast_paragraph_test.go')
| -rw-r--r-- | markdown/ast_paragraph_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/markdown/ast_paragraph_test.go b/markdown/ast_paragraph_test.go index 46dd714..2014ab9 100644 --- a/markdown/ast_paragraph_test.go +++ b/markdown/ast_paragraph_test.go @@ -11,3 +11,23 @@ func TestParagraph(t *testing.T) { t.Errorf("failed, got %s", c) } } + +func TestParagraph_Replacer(t *testing.T) { + opt := &Option{ + Replaces: map[rune]string{'~': " "}, + } + c, err := Parse("bonsoir", opt) + if err != nil { + t.Fatal(err) + } + if c != "<p>bonsoir</p>" { + t.Errorf("failed, got %s", c) + } + c, err = Parse("bonsoir~!", opt) + if err != nil { + t.Fatal(err) + } + if c != "<p>bonsoir !</p>" { + t.Errorf("failed, got %s", c) + } +} |
