Implemented code blocks
This commit is contained in:
@ -49,6 +49,11 @@ func TestTables(t *testing.T) {
|
||||
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 TestCode(t *testing.T) {
|
||||
assert.Equal(t, markdown.Render("```\nText\n```"), "<pre><code>Text</code></pre>")
|
||||
assert.Equal(t, markdown.Render("```go\ntype A struct {\n\t\n}\n```"), "<pre><code class=\"language-go\">type A struct {\n\t\n}</code></pre>")
|
||||
}
|
||||
|
||||
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