diff --git a/src/mathjax-suggest.ts b/src/mathjax-suggest.ts index 42877511..0a718363 100644 --- a/src/mathjax-suggest.ts +++ b/src/mathjax-suggest.ts @@ -168,7 +168,7 @@ export default class MathjaxSuggest extends EditorSuggest { // if the stack is empty then we are not in a mathjax environment // if the stack is not empty then we are in a mathjax environment const stack: string[] = []; - const regex = /(\$\$|\$)/g; + const regex = /(?