Implemented tables
This commit is contained in:
@ -44,6 +44,11 @@ func TestList(t *testing.T) {
|
||||
assert.Equal(t, markdown.Render("- Entry 1\n- Entry 2\n- Entry 3"), "<ul><li>Entry 1</li><li>Entry 2</li><li>Entry 3</li></ul>")
|
||||
}
|
||||
|
||||
func TestTables(t *testing.T) {
|
||||
assert.Equal(t, markdown.Render("| Head |\n| --- |\n| Body |"), "<table><thead><tr><th>Head</th></tr></thead><tbody><tr><td>Body</td></tr></tbody></table>")
|
||||
assert.Equal(t, markdown.Render("| 1 | 2 |\n| --- | --- |\n| 1 | 2 |"), "<table><thead><tr><th>1</th><th>2</th></tr></thead><tbody><tr><td>1</td><td>2</td></tr></tbody></table>")
|
||||
}
|
||||
|
||||
func TestQuote(t *testing.T) {
|
||||
assert.Equal(t, markdown.Render("> Line"), "<blockquote><p>Line</p></blockquote>")
|
||||
assert.Equal(t, markdown.Render("> Line 1\n> Line 2"), "<blockquote><p>Line 1 Line 2</p></blockquote>")
|
||||
|
Reference in New Issue
Block a user