mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bugfix: fix Mermaid error
This commit is contained in:
parent
14c7778dc7
commit
9f91d35d34
@ -147,6 +147,7 @@ document.onkeydown = function(e) {
|
|||||||
var mermaidParserErr = false;
|
var mermaidParserErr = false;
|
||||||
var mermaidIdx = 0;
|
var mermaidIdx = 0;
|
||||||
|
|
||||||
|
if (VEnableMermaid) {
|
||||||
mermaidAPI.parseError = function(err, hash) {
|
mermaidAPI.parseError = function(err, hash) {
|
||||||
content.setLog("err: " + err);
|
content.setLog("err: " + err);
|
||||||
mermaidParserErr = true;
|
mermaidParserErr = true;
|
||||||
@ -158,6 +159,7 @@ mermaidAPI.parseError = function(err, hash) {
|
|||||||
parentNode.outerHTML = '';
|
parentNode.outerHTML = '';
|
||||||
delete parentNode;
|
delete parentNode;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// @className, the class name of the mermaid code block, such as 'lang-mermaid'.
|
// @className, the class name of the mermaid code block, such as 'lang-mermaid'.
|
||||||
var renderMermaid = function(className) {
|
var renderMermaid = function(className) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user