Preserve line breaks in markdown
This commit is contained in:
parent
998cb36421
commit
4f84ecb741
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ class Utils {
|
||||||
// HACKHACK: Somehow, marked doesn't encode angle brackets
|
// HACKHACK: Somehow, marked doesn't encode angle brackets
|
||||||
const renderer = new marked.Renderer()
|
const renderer = new marked.Renderer()
|
||||||
renderer.link = (href, title, contents) => `<a target="_blank" href="${href}" title="${title || ''}" onclick="event.stopPropagation();">${contents}</a>`
|
renderer.link = (href, title, contents) => `<a target="_blank" href="${href}" title="${title || ''}" onclick="event.stopPropagation();">${contents}</a>`
|
||||||
const html = marked(text.replace(/</g, '<'), {renderer})
|
const html = marked(text.replace(/</g, '<'), {renderer, breaks: true})
|
||||||
return html
|
return html
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue