Implemented strikethrough text

This commit is contained in:
2024-04-02 20:50:33 +02:00
parent 3b776ef8cd
commit d7fd8c74e8
3 changed files with 29 additions and 5 deletions

View File

@ -39,6 +39,11 @@ func TestBold(t *testing.T) {
assert.Equal(t, markdown.Render("__bold__"), "<p><strong>bold</strong></p>")
}
func TestStrike(t *testing.T) {
assert.Equal(t, markdown.Render("~normal text~"), "<p>~normal text~</p>")
assert.Equal(t, markdown.Render("~~deleted text~~"), "<p><del>deleted text</del></p>")
}
func TestLink(t *testing.T) {
assert.Equal(t, markdown.Render("[text](https://example.com/)"), "<p><a href=\"https://example.com/\">text</a></p>")
assert.Equal(t, markdown.Render("[text](https://example.com/"), "<p>[text](https://example.com/</p>")