fix: fix some markdown rendering bugs (closes #46)

This commit is contained in:
Sam 2023-04-03 23:32:34 +02:00
parent 691711d542
commit 033b9b5904
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
5 changed files with 30 additions and 25 deletions

View file

@ -4,7 +4,8 @@ import sanitize from "sanitize-html";
const md = new MarkdownIt({
html: false,
breaks: true,
}).disable(["heading", "link", "table"]);
linkify: true,
}).disable(["heading", "lheading", "link", "table", "blockquote"]);
export function renderMarkdown(src: string | null) {
return src ? sanitize(md.render(src)) : null;