fix(frontend): 修复公式输出展示问题并引入 KaTeX 支持 (#912)

This commit is contained in:
jw_mac
2026-04-21 23:19:22 +08:00
committed by lyingbug
parent da8191cd57
commit a121a5d636
7 changed files with 93 additions and 17 deletions
+17 -5
View File
@@ -1,12 +1,12 @@
{
"name": "knowledage-base",
"version": "0.3.6",
"version": "0.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "knowledage-base",
"version": "0.3.6",
"version": "0.4.0",
"dependencies": {
"@microsoft/fetch-event-source": "^2.0.1",
"@types/dompurify": "^3.0.5",
@@ -16,7 +16,9 @@
"docx-preview": "^0.3.7",
"dompurify": "^3.2.6",
"highlight.js": "^11.11.1",
"katex": "^0.16.45",
"marked": "^17.0.5",
"marked-katex-extension": "^5.1.8",
"mermaid": "^11.4.1",
"pagefind": "^1.1.1",
"papaparse": "^5.5.3",
@@ -3774,9 +3776,9 @@
}
},
"node_modules/katex": {
"version": "0.16.33",
"resolved": "https://mirrors.tencent.com/npm/katex/-/katex-0.16.33.tgz",
"integrity": "sha512-q3N5u+1sY9Bu7T4nlXoiRBXWfwSefNGoKeOwekV+gw0cAXQlz2Ww6BLcmBxVDeXBMUDQv6fK5bcNaJLxob3ZQA==",
"version": "0.16.45",
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.45.tgz",
"integrity": "sha512-pQpZbdBu7wCTmQUh7ufPmLr0pFoObnGUoL/yhtwJDgmmQpbkg/0HSVti25Fu4rmd1oCR6NGWe9vqTWuWv3GcNA==",
"funding": [
"https://opencollective.com/katex",
"https://github.com/sponsors/katex"
@@ -3961,6 +3963,16 @@
"node": ">= 20"
}
},
"node_modules/marked-katex-extension": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/marked-katex-extension/-/marked-katex-extension-5.1.8.tgz",
"integrity": "sha512-TsV9OCHHDjVBf4IH0RSjLs4Eqsjj8HGfmVCKlimrS391EtBBxzXj2gBYdF9tY7f7oXu9tb1kHV86ExJsG3iMhw==",
"license": "MIT",
"peerDependencies": {
"katex": ">=0.16 <0.17",
"marked": ">=4 <19"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://mirrors.tencent.com/npm/math-intrinsics/-/math-intrinsics-1.1.0.tgz",