fix: fix some markdown rendering bugs (closes #46)
This commit is contained in:
parent
691711d542
commit
033b9b5904
5 changed files with 30 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue