Skip to content

Commit

Permalink
Update version to 2.0.1 in manifest.json and enhance LaTeX processing…
Browse files Browse the repository at this point in the history
… in latex.js

- Bumped version number in manifest.json to 2.0.1.
- Added support for \boxed command in latex.js to improve LaTeX rendering capabilities.
  • Loading branch information
yym68686 committed Jan 22, 2025
1 parent a7ecf5d commit 1848ae3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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'"
Expand Down
3 changes: 3 additions & 0 deletions src/utils/latex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1848ae3

Please sign in to comment.