diff --git a/app/assets/javascripts/discourse/components/markdown.js b/app/assets/javascripts/discourse/components/markdown.js index 27317fb77c8..599dce085a5 100644 --- a/app/assets/javascripts/discourse/components/markdown.js +++ b/app/assets/javascripts/discourse/components/markdown.js @@ -143,7 +143,7 @@ Discourse.Markdown = { if (!text) return ""; // don't do @username mentions inside
or blocks
- text = text.replace(/<(pre|code)>([\s\S]*?@[\s\S]*?)<\/(pre|code)>)/gi, function(wholeMatch, m1, m2, m3) {
+ text = text.replace(/<(pre|code)>([\s\S]*?@[\s\S]*?)<\/(pre|code)>/gi, function(wholeMatch, m1, m2, m3) {
return "<" + m1 + ">" + (m2.replace(/@/g, '@')) + "" + m3 + ">";
});