From 6dba85ff6559ed61494f7eb5ecf44386701aa703 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sat, 23 Sep 2017 17:59:06 +0000 Subject: [PATCH] Fix regex for being too greedy in codeblocks --- webapp/titanembeds/static/js/embed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index b17b76b..3362379 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -777,7 +777,7 @@ text = text.replace(/__(.*?)__/g, "$1"); text = text.replace(/_(.*?)_/g, "$1"); text = text.replace(/~~(.*?)~~/g, "$1"); - text = text.replace(/\`\`\`([^]+)\`\`\`/g, "$1"); + text = text.replace(/\`\`\`([^]+?)\`\`\`/g, "$1"); text = text.replace(/\`(.*?)\`/g, "$1"); if (links) { for (var i = 0; i < links.length; i++) {