diff --git a/webclient/src/Article.js b/webclient/src/Article.js index 0761dca..9af3567 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('$$')) { + if (text.includes('\\[') || text.includes('\\(') || text.includes('$$') || text.includes('$')) { return {text}; } @@ -138,7 +138,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('$')); const props = { key: key }; if (v.hasAttributes()) {