From 281e36c17844d6a81d78281c827f363d63e85958 Mon Sep 17 00:00:00 2001 From: Layerex Date: Sun, 9 Jun 2024 23:25:53 +0300 Subject: [PATCH] Ignore escaped $ characters (\$), when checking for MathJax environment --- src/mathjax-suggest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = /(?