feat: mermaid support for markdown

This commit is contained in:
NGPixel
2020-03-29 20:54:39 -04:00
parent 951ebb6b61
commit 1d16a3fc71
5 changed files with 163 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
module.exports = {
init($, config) {
$('pre.prismjs > code.language-mermaid').each((i, elm) => {
const mermaidContent = $(elm).html()
$(elm).parent().replaceWith(`<div class="mermaid">${mermaidContent}</div>`)
})
}
}