feat: count characters consistently
This commit is contained in:
parent
80ca1cae00
commit
8433a1523a
9 changed files with 54 additions and 20 deletions
|
|
@ -1,11 +0,0 @@
|
|||
import MarkdownIt from "markdown-it";
|
||||
import sanitize from "sanitize-html";
|
||||
|
||||
const md = new MarkdownIt({
|
||||
html: false,
|
||||
breaks: true,
|
||||
}).disable(["heading", "link", "table"]);
|
||||
|
||||
export default function renderMarkdown(src: string | null) {
|
||||
return src ? sanitize(md.render(src)) : null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue