diff --git a/manifest.json b/manifest.json index 6983c10..6921640 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Cerebr", - "version": "2.0.0", + "version": "2.0.1", "description": "Cerebr - 智能AI聊天助手", "content_security_policy": { "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'" diff --git a/src/utils/latex.js b/src/utils/latex.js index e425edd..8b5866b 100644 --- a/src/utils/latex.js +++ b/src/utils/latex.js @@ -4,6 +4,9 @@ export function processMathAndMarkdown(text) { let mathIndex = 0; text = text.replace(/\\\[([a-zA-Z\d]+)\]/g, '[$1]'); + // 处理 \boxed 命令,将其包装在 \[ \] 中 + text = text.replace(/\\boxed\{([^}]+)\}/g, '\\[\\boxed{$1}\\]'); + // 处理 \textsc 命令 text = text.replace(/\\textsc\{([^}]+)\}/g, (match, content) => { return content.toUpperCase();