Closed z4none closed 10 years ago
修改方法:
function mdupdate() { var converter = new Showdown.converter(); var tmp = $("#editmd").val(); // 非贪婪全局替换 tmp = tmp.replace(/~~~~\{(.*)\}\n([\s\S]*?)~~~~\n/gm, "<pre><code class=\"language-$1\">$2</code></pre>"); tmp = tmp.replace(/~~~~\n([\s\S]*?)~~~~\n/gm, "<pre><code>$1</code></pre>"); tmp = converter.makeHtml(tmp); $("#edithtml").html(tmp); Prism.highlightAll(); MathJax.Hub.Queue(["Typeset", MathJax.Hub, "edithtml"]); }
Thanks,https://github.com/isnowfy/simple/issues/3 gh-pages改了,master分支忘记改了。。。
修改方法: