Skip to content
Snippets Groups Projects
Commit e807867d authored by Christos's avatar Christos
Browse files

Merge branch 'fix-regex' into 'master'

fix regex for firefox

See merge request !197
parents c571e26a 2ee4c608
No related branches found
No related tags found
1 merge request!197fix regex for firefox
......@@ -17,10 +17,7 @@ class MathService extends Service {
const schema = this.container.get('Schema');
const rules = this.container.get('Rules');
const newRules = [
inlineInputRule(
/(?<!\\)\$(.+)(?<!\\)\$/,
schema.schema.nodes.math_inline,
),
inlineInputRule(/(?!\\)\$(.+)(?!\\)\$/, schema.schema.nodes.math_inline),
blockInputRule(/^\$\$\s+$/, schema.schema.nodes.math_display),
];
// rules.addRule(newRules);
......
......@@ -55,7 +55,7 @@ class Rules {
this.schema.nodes.heading,
match => ({ level: match[1].length }),
),
inlineInputRule(/(?<!\\)\$(.+)(?<!\\)\$/, this.schema.nodes.math_inline),
inlineInputRule(/(?!\\)\$(.+)(?!\\)\$/, this.schema.nodes.math_inline),
blockInputRule(/^\$\$\s+$/, this.schema.nodes.math_display),
];
}
......
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