修复公式解析的 Bug

This commit is contained in:
RockYang
2025-02-20 11:17:12 +08:00
parent dd675c9a9b
commit 03d33c784c
8 changed files with 69 additions and 44 deletions

View File

@@ -213,6 +213,10 @@ export function processContent(content) {
return "";
});
}
// 支持 \[ 公式标签
content = content.replace(/\\\[/g, "$$").replace(/\\\]/g, "$$");
content = content.replace(/\\\(\\boxed\{(\d+)\}\\\)/g, '<span class="boxed">$1</span>');
return content;
}