merge: branch 'main' into reports

This commit is contained in:
Sam 2023-03-23 10:50:36 +01:00
commit 244c13cd84
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
30 changed files with 207 additions and 435 deletions

View file

@ -0,0 +1,11 @@
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;
}