Fix finishView mermaid might select and replace whole markdown-body issue

This commit is contained in:
Wu Cheng-Han 2016-10-18 12:14:17 +08:00
parent e311a1f620
commit 843f025cb5

View file

@ -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) {