diff --git a/dist/index.html b/dist/index.html index ad56ab0..46abac1 100644 --- a/dist/index.html +++ b/dist/index.html @@ -6,7 +6,7 @@
\[TOC\]<\/p>/gi,'
')),e.html(r),this.handleToc(e,n),this.config.imageCaption&&this.insertImageCaption(e),this.imageHelper.setupImageView(e),this.handleFrontMatter(e),this.renderMermaid(e,this.config.langPrefix+"mermaid"),this.renderFlowchart(e,[this.config.langPrefix+"flowchart",this.config.langPrefix+"flow"]),this.renderWavedrom(e,this.config.langPrefix+"wavedrom"),this.renderPlantUML(e,this.config.langPrefix+"puml"),this.makeImageFluid(e),this.addClassToCodeBlock(e),this.config.codeBlockLineNumber&&this.renderCodeBlockLineNumber(e),this.renderMathJax(e)}else e.empty()}},{key:"handleToc",value:function(e,t){if(t){var r=new a.default,n=r.tocToTree(this.toc),o=0==this.toc.length,i=e.find("."+this.inpageTocClass);o?i.remove():(i.html(n),r.rewriteAnchorInToc(i))}}},{key:"insertImageCaption",value:function(e){for(var t,r,n,o=e.find("img"),i=0;i
"));r.html(hljs.highlight("yaml",this.frontMatterText,!0).value),t.append(r),e.prepend(t)}}},{key:"renderMermaid",value:function(e,t){for(var o=this,r=function(e){o.mermaidParseError=!1,o.mermaidIndex++;var t=null;try{t=mermaid.mermaidAPI.render(o.mermaidClass+"-"+o.mermaidIndex,e.textContent,function(){})}catch(e){return console.log("err:",e),!1}if(o.mermaidParseError||!t)return!1;var r=document.createElement("div");r.classList.add(o.mermaidClass),r.innerHTML=t;var n=e.parentNode;return n.parentNode.replaceChild(r,n),!0},n=e.find("pre code"),i=this.mermaidIndex=0;i\[TOC\]<\/p>/gi,'
')),e.html(r),this.handleToc(e,n),this.config.imageCaption&&this.insertImageCaption(e),this.imageHelper.setupImageView(e),this.handleFrontMatter(e),this.renderMermaid(e,this.config.langPrefix+"mermaid"),this.renderFlowchart(e,[this.config.langPrefix+"flowchart",this.config.langPrefix+"flow"]),this.renderWavedrom(e,this.config.langPrefix+"wavedrom"),this.renderPlantUML(e,this.config.langPrefix+"puml"),this.makeImageFluid(e),this.addClassToCodeBlock(e),this.config.codeBlockLineNumber&&this.renderCodeBlockLineNumber(e),this.renderMathJax(e)}else e.empty()}},{key:"handleToc",value:function(e,t){if(t){var r=new a.default,n=r.tocToTree(this.toc),o=0==this.toc.length,i=e.find("."+this.inpageTocClass);o?i.remove():(i.html(n),r.rewriteAnchorInToc(i))}}},{key:"insertImageCaption",value:function(e){for(var t,r,n,o=e.find("img"),i=0;i
"));r.html(hljs.highlight("yaml",this.frontMatterText,!0).value),t.append(r),e.prepend(t)}}},{key:"renderMermaid",value:function(e,t){for(var o=this,r=function(e){o.mermaidParseError=!1,o.mermaidIndex++;var t=null;try{t=mermaid.mermaidAPI.render(o.mermaidClass+"-"+o.mermaidIndex,e.textContent,function(){})}catch(e){return console.log("err:",e),!1}if(o.mermaidParseError||!t)return!1;var r=document.createElement("div");r.classList.add(o.mermaidClass),r.innerHTML=t;var n=e.parentNode;return n.parentNode.replaceChild(r,n),!0},n=e.find("pre code"),i=this.mermaidIndex=0;i