From f29086d1b2954c121e5a0abfb6673e32150c1139 Mon Sep 17 00:00:00 2001 From: 18292821405 <760218327@qq.com> Date: Sat, 27 Apr 2019 20:00:16 +0800 Subject: [PATCH] fix mermaid class problem --- packages/nodeppt-parser/lib/markdown/mermaid.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nodeppt-parser/lib/markdown/mermaid.js b/packages/nodeppt-parser/lib/markdown/mermaid.js index 6080ec7db..bf1ed9db2 100644 --- a/packages/nodeppt-parser/lib/markdown/mermaid.js +++ b/packages/nodeppt-parser/lib/markdown/mermaid.js @@ -4,6 +4,7 @@ module.exports = md => { const token = tokens[idx]; const code = token.content; if (token.info === 'mermaid') { + token.attrJoin('class', 'lang-mermaid no-style'); let attrs = token.attrs || []; attrs = attrs .map(([key, value]) => { @@ -13,7 +14,7 @@ module.exports = md => { // 增加对 mermaidjs 支持,这样就可以画流程图了哦~ return `
-
${code}
+
${code}
`; }