Some plugins have functions written inside strings to be placed inside elements, which is kinda sketchy. It would be better to make them part of the code, and get their string representations with Function.prototype.toString()
|
initScript.text = "mermaid.initialize({ flowchart: { htmlLabels: false } });"; |
|
`document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}]})});` |
Some plugins have functions written inside strings to be placed inside elements, which is kinda sketchy. It would be better to make them part of the code, and get their string representations with
Function.prototype.toString()pmt/src/plugins/mermaid.js
Line 21 in cf209bd
pmt/src/plugins/katex.js
Line 25 in cf209bd