summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-18 12:14:17 +0800
committerWu Cheng-Han2016-10-18 12:14:17 +0800
commit843f025cb585a9d19aade2cdb31ac06bb1a1d99f (patch)
tree1d6f6c4e6305df3defaa0325482713ccc25614bf
parente311a1f6202d02e0bb869d8141b67ee04fec8ab4 (diff)
Fix finishView mermaid might select and replace whole markdown-body issue
Diffstat (limited to '')
-rw-r--r--public/js/extra.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 61e010c6..84b7c7d3 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -325,11 +325,11 @@ function finishView(view) {
});
//mermaid
- var mermaids = view.find(".mermaid.raw").removeClass("raw");
+ var mermaids = view.find("div.mermaid.raw").removeClass("raw");
mermaids.each(function (key, value) {
try {
var $value = $(value);
- var $ele = $(value).parent().parent();
+ var $ele = $(value).closest('pre');
var mermaidError = null;
mermaid.parseError = function (err, hash) {