Added check for previously processed div elements, fix for issue #29, thank to user madebits for fix.
This commit is contained in:
parent
0539b8a74e
commit
52a78375a4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -271,6 +271,12 @@ var init = function () {
|
|||
var cnt = 0;
|
||||
for (i = 0; i < arr.length; i++) {
|
||||
var element = arr[i];
|
||||
|
||||
// Check if previously processed
|
||||
if(!element.getAttribute("data-processed")) {
|
||||
element.setAttribute("data-processed", true);
|
||||
} else continue;
|
||||
|
||||
var id;
|
||||
|
||||
id = 'mermaidChart' + cnt;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<script src="browserifyUsage.js"></script>
|
||||
<script src="../dist/mermaid.full.js"></script>
|
||||
<script>
|
||||
var mermaid_config = {
|
||||
startOnLoad:true
|
||||
|
|
Loading…
Reference in New Issue