diff --git a/webclient/src/Article.js b/webclient/src/Article.js index dde7fb3..88a79f9 100644 --- a/webclient/src/Article.js +++ b/webclient/src/Article.js @@ -137,7 +137,8 @@ function Article({ cache }) { const textContent = v.textContent.trim(); const isMath = (textContent.startsWith('\\(') && textContent.endsWith('\\)')) || (textContent.startsWith('\\[') && textContent.endsWith('\\]')) || - (textContent.startsWith('$$') && textContent.endsWith('$$')); + (textContent.startsWith('$$') && textContent.endsWith('$$')) || + (textContent.startsWith('$') && textContent.endsWith('$') && textContent.indexOf('$') !== textContent.lastIndexOf('$') && !/\s/.test(textContent.charAt(textContent.length - 2))); const props = { key: key }; if (v.hasAttributes()) {