Allow emphasis in post content
This commit is contained in:
parent
a71192e535
commit
fa10cd95c0
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ const markdown = new MarkdownIt({ linkify: true, breaks: true })
|
|||
|
||||
// Minimal renderer
|
||||
const markdownLite = new MarkdownIt({ linkify: true, breaks: true })
|
||||
.disable(["emphasis", "strikethrough", "image"])
|
||||
.disable(["strikethrough", "image"])
|
||||
.use(
|
||||
MarkdownItLinkAttrs,
|
||||
{ attrs: { target: "_blank", rel: "noopener" } },
|
||||
|
|
|
@ -5,6 +5,6 @@ describe("Render markdown", () => {
|
|||
it("Render markdown lite", () => {
|
||||
const text = "test **bold** ~~strike~~ with `code`, <span>html</span> and https://example.com\nand a new line"
|
||||
const html = renderMarkdownLite(text)
|
||||
expect(html).to.equal('test **bold** ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com" target="_blank" rel="noopener">https://example.com</a><br>\nand a new line')
|
||||
expect(html).to.equal('test <strong>bold</strong> ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com" target="_blank" rel="noopener">https://example.com</a><br>\nand a new line')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue