From 0c1c56b54ae861dd784aabe39bea7c9c06322569 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 8 Dec 2025 23:52:36 +0000 Subject: [PATCH] Fix: Prevent false positive single dollar math detection in text nodes Co-authored-by: aider (gemini/gemini-2.5-pro) --- webclient/src/Article.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webclient/src/Article.js b/webclient/src/Article.js index 629e7d6..212d2ec 100644 --- a/webclient/src/Article.js +++ b/webclient/src/Article.js @@ -106,7 +106,7 @@ function Article({ cache }) { if (v.nodeName === '#text') { const text = v.data; - if (text.includes('\\[') || text.includes('\\(') || text.includes('$$') || text.includes('$')) { + if (text.includes('\\[') || text.includes('\\(') || text.includes('$$') || /\$(?:[^$]*[^\s$])\$/.test(text)) { return {text}; }