Fix regex for being too greedy in codeblocks

This commit is contained in:
Jeremy Zhang 2017-09-23 17:59:06 +00:00
parent 7ce53b851c
commit 6dba85ff65

View File

@ -777,7 +777,7 @@
text = text.replace(/__(.*?)__/g, "<u>$1</u>");
text = text.replace(/_(.*?)_/g, "<i>$1</i>");
text = text.replace(/~~(.*?)~~/g, "<del>$1</del>");
text = text.replace(/\`\`\`([^]+)\`\`\`/g, "<code class=\"blockcode\">$1</code>");
text = text.replace(/\`\`\`([^]+?)\`\`\`/g, "<code class=\"blockcode\">$1</code>");
text = text.replace(/\`(.*?)\`/g, "<code>$1</code>");
if (links) {
for (var i = 0; i < links.length; i++) {