Skip to content

A platform for community discussion. Free, open, simple.

FIX: IE not supporting regex negative lookbehind

Vinoth Kannane9cd7af10e05
diff --git a/app/assets/javascripts/discourse/lib/to-markdown.js.es6 b/app/assets/javascripts/discourse/lib/to-markdown.js.es6
index 7a2bc370af8..2fd90c59e01 100644
--- a/app/assets/javascripts/discourse/lib/to-markdown.js.es6
+++ b/app/assets/javascripts/discourse/lib/to-markdown.js.es6
@@ -2,7 +2,7 @@ import parseHTML from 'discourse/helpers/parse-html';
const trimLeft = text => text.replace(/^\s+/,"");
const trimRight = text => text.replace(/\s+$/,"");
-const countPipes = text => text.match(/(?<!\\)\|/g).length;
+const countPipes = text => text.replace(/\\\|/,"").match(/\|/g).length;
class Tag {
constructor(name, prefix = "", suffix = "", inline = false) {