From e25d21352e0c9ebdd39a97ace24e715ff6e23f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=A4=E3=83=90=E3=82=81=E3=81=AE=E3=81=9F=E3=81=A6?= <139752252+YabamenoTate@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:51:30 +0900 Subject: [PATCH 1/2] Update LaTeX.js --- src/LaTeX.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/LaTeX.js b/src/LaTeX.js index a361224..8aa530a 100644 --- a/src/LaTeX.js +++ b/src/LaTeX.js @@ -99,6 +99,9 @@ export default class Plugin { if ((codeText.startsWith("$$") && codeText.endsWith("$$")) || (codeText.startsWith("\\[") && codeText.endsWith("\\]"))) { findCodeElement(codeElement).outerHTML = "mthjxblock" + sanitize(codeText).slice(2, -2) + "mthjxblockend"; containsTex = true; + } else if (codeText.startsWith("\\begin") && codeText.endsWith("}")) { + findCodeElement(codeElement).outerHTML = "mthjxblock" + sanitize(codeText) + "mthjxblockend"; + containsTex = true; } else if (codeText.startsWith("$") && codeText.endsWith("$")) { findCodeElement(codeElement).outerHTML = "mthjxinline" + sanitize(codeText).slice(1, -1) + "mthjxinlineend"; containsTex = true; From f6610b809c716f37973171850fcf979ca3be18c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=A4=E3=83=90=E3=82=81=E3=81=AE=E3=81=9F=E3=81=A6?= <139752252+YabamenoTate@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:52:09 +0900 Subject: [PATCH 2/2] Update LaTeX.plugin.js --- dist/LaTeX.plugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/LaTeX.plugin.js b/dist/LaTeX.plugin.js index f0eb2c6..3ae3623 100644 --- a/dist/LaTeX.plugin.js +++ b/dist/LaTeX.plugin.js @@ -220,6 +220,9 @@ class Plugin { if ((codeText.startsWith("$$") && codeText.endsWith("$$")) || (codeText.startsWith("\\[") && codeText.endsWith("\\]"))) { findCodeElement(codeElement).outerHTML = "mthjxblock" + sanitize(codeText).slice(2, -2) + "mthjxblockend"; containsTex = true; + } else if (codeText.startsWith("\\begin") && codeText.endsWith("}")) { + findCodeElement(codeElement).outerHTML = "mthjxblock" + sanitize(codeText) + "mthjxblockend"; + containsTex = true; } else if (codeText.startsWith("$") && codeText.endsWith("$")) { findCodeElement(codeElement).outerHTML = "mthjxinline" + sanitize(codeText).slice(1, -1) + "mthjxinlineend"; containsTex = true; @@ -237,4 +240,4 @@ class Plugin { module.exports = __webpack_exports__["default"]; /******/ })() -; \ No newline at end of file +;