Add blockquote, image and hr to markdown rendering test
This commit is contained in:
parent
c9edb92a7a
commit
e3054904e9
1 changed files with 3 additions and 3 deletions
|
@ -5,15 +5,15 @@ import {
|
||||||
} from "@/utils/markdown"
|
} from "@/utils/markdown"
|
||||||
|
|
||||||
describe("Render markdown", () => {
|
describe("Render markdown", () => {
|
||||||
const text = "# heading\n\ntest **bold** test *italic* test ~~strike~~ with `code`, <span>html</span> and https://example.com\nnew line\n\ntwo new lines and a list:\n- item 1\n- item 2\n\ncode block:\n```\nlet test\ntest = 1\n```"
|
const text = "# heading\n\ntest **bold** test *italic* test ~~strike~~ with `code`, <span>html</span> and https://example.com\nnew line\n\ntwo new lines and a list:\n- item 1\n- item 2\n\n>greentext\n\n---\n\nimage: ![logo](logo.png)\n\ncode block:\n```\nlet test\ntest = 1\n```"
|
||||||
|
|
||||||
it("Render markdown lite", () => {
|
it("Render markdown lite", () => {
|
||||||
const html = renderMarkdownLite(text)
|
const html = renderMarkdownLite(text)
|
||||||
expect(html).to.equal('<p># heading</p><p>test <strong>bold</strong> test <em>italic</em> test ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com">https://example.com</a><br>new line</p><p>two new lines and a list:<br>- item 1<br>- item 2</p><p>code block:</p><pre><code>let test\ntest = 1\n</code></pre>')
|
expect(html).to.equal('<p># heading</p><p>test <strong>bold</strong> test <em>italic</em> test ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com">https://example.com</a><br>new line</p><p>two new lines and a list:<br>- item 1<br>- item 2</p><p>>greentext</p><p>---</p><p>image: !<a href="logo.png">logo</a></p><p>code block:</p><pre><code>let test\ntest = 1\n</code></pre>')
|
||||||
})
|
})
|
||||||
|
|
||||||
it("Render markdown lite inline", () => {
|
it("Render markdown lite inline", () => {
|
||||||
const html = renderMarkdownLiteInline(text)
|
const html = renderMarkdownLiteInline(text)
|
||||||
expect(html).to.equal('# heading<br><br>test <strong>bold</strong> test <em>italic</em> test ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com">https://example.com</a><br>new line<br><br>two new lines and a list:<br>- item 1<br>- item 2<br><br>code block:<br><code>let test test = 1</code>')
|
expect(html).to.equal('# heading<br><br>test <strong>bold</strong> test <em>italic</em> test ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com">https://example.com</a><br>new line<br><br>two new lines and a list:<br>- item 1<br>- item 2<br><br>>greentext<br><br>---<br><br>image: !<a href="logo.png">logo</a><br><br>code block:<br><code>let test test = 1</code>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue