Commit e807867d authored by Christos's avatar Christos
Browse files

Merge branch 'fix-regex' into 'master'

fix regex for firefox

See merge request wax/wax-prosemirror!197
parents c571e26a 2ee4c608
...@@ -17,10 +17,7 @@ class MathService extends Service { ...@@ -17,10 +17,7 @@ class MathService extends Service {
const schema = this.container.get('Schema'); const schema = this.container.get('Schema');
const rules = this.container.get('Rules'); const rules = this.container.get('Rules');
const newRules = [ const newRules = [
inlineInputRule( inlineInputRule(/(?!\\)\$(.+)(?!\\)\$/, schema.schema.nodes.math_inline),
/(?<!\\)\$(.+)(?<!\\)\$/,
schema.schema.nodes.math_inline,
),
blockInputRule(/^\$\$\s+$/, schema.schema.nodes.math_display), blockInputRule(/^\$\$\s+$/, schema.schema.nodes.math_display),
]; ];
// rules.addRule(newRules); // rules.addRule(newRules);
......
...@@ -55,7 +55,7 @@ class Rules { ...@@ -55,7 +55,7 @@ class Rules {
this.schema.nodes.heading, this.schema.nodes.heading,
match => ({ level: match[1].length }), match => ({ level: match[1].length }),
), ),
inlineInputRule(/(?<!\\)\$(.+)(?<!\\)\$/, this.schema.nodes.math_inline), inlineInputRule(/(?!\\)\$(.+)(?!\\)\$/, this.schema.nodes.math_inline),
blockInputRule(/^\$\$\s+$/, this.schema.nodes.math_display), blockInputRule(/^\$\$\s+$/, this.schema.nodes.math_display),
]; ];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment