Please makes sure these boxes are checked before submitting your PR, thank you! * [x] Make sure you are merging your commits to `master` branch. * [x] Add some descriptions and refer relative issues for you PR. * [x] DO NOT include files inside `lib` directory.
This commit is contained in:
parent
cc79e2e992
commit
a72e7490c3
1 changed files with 2 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ window.$docsify = {
|
|||
// <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css">
|
||||
// <script src="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
|
||||
var num = 0;
|
||||
mermaid.initialize({ startOnLoad: false });
|
||||
|
||||
window.$docsify = {
|
||||
|
|
@ -44,7 +45,7 @@ window.$docsify = {
|
|||
code: function(code, lang) {
|
||||
if (lang === "mermaid") {
|
||||
return (
|
||||
'<div class="mermaid">' + mermaid.render(lang, code) + "</div>"
|
||||
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + "</div>"
|
||||
);
|
||||
}
|
||||
return this.origin.code.apply(this, arguments);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue