diff --git a/webclient/src/Article.js b/webclient/src/Article.js
index 514c406..8d876c1 100644
--- a/webclient/src/Article.js
+++ b/webclient/src/Article.js
@@ -135,6 +135,11 @@ function Article({ cache }) {
);
}
+ const textContent = v.textContent.trim();
+ const isMath = (textContent.startsWith('\\(') && textContent.endsWith('\\)')) ||
+ (textContent.startsWith('\\[') && textContent.endsWith('\\]')) ||
+ (textContent.startsWith('$$') && textContent.endsWith('$$'));
+
const props = { key: key };
if (v.hasAttributes()) {
for (const attr of v.attributes) {
@@ -143,6 +148,10 @@ function Article({ cache }) {
}
}
+ if (isMath) {
+ return {v.textContent};
+ }
+
if (VOID_ELEMENTS.includes(Tag)) {
return ;
}