WeKnora/frontend
MLYoshi 4dd19b5356
fix(frontend): render single tilde literally instead of GFM strikethrough (#3963)
* fix(markdown): 单个波浪号不再被解析成删除线

GFM 会把区间标记(如 2020~2035)里的单个 `~` 误解析成删除线。
覆盖 marked 的 del tokenizer:`~~...~~` 仍走默认删除线规则,
单个 `~` 则按字面保留;并新增单测覆盖时间/区间场景。

* fix(markdown): register the literal single-tilde tokenizer once

doc-content.vue and WikiBrowser.vue called marked.use() for the del
tokenizer override inside <script setup>, so every mount wrapped the
global marked tokenizer one more time. Move the extension into
utils/markedLiteralTilde.ts and register it on the global marked behind
a once-only guard; the preview Marked instance reuses the same
extension object. Add a test that repeated registration does not
re-wrap tokenizer.del.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-10-08 13:04:36 +08:00
..
public feat(i18n): add Japanese (ja-JP) locale support (#3080) 2026-09-07 19:20:41 +08:00
scripts feat(browser): add picture-in-picture task preview 2026-09-12 11:11:36 +08:00
src fix(frontend): render single tilde literally instead of GFM strikethrough (#3963) 2026-10-08 13:04:36 +08:00
tests/source-locate fix(citations): 修复原文定位、高亮范围与 DocReader 启动失败 (#3794) 2026-09-27 20:32:26 +08:00
.dockerignore feat(ui): multi-stage Docker frontend build (no host npm) (#3074) 2026-09-07 19:33:57 +08:00
.gitignore init commit 2025-08-05 15:08:07 +08:00
Dockerfile chore: remove vendored archives and unused Python helpers 2026-09-16 15:49:36 +08:00
docker-entrypoint.sh feat(i18n): add Japanese (ja-JP) locale support (#3080) 2026-09-07 19:20:41 +08:00
embed.html feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
env.d.ts feat(frontend): inject commit ID into frontend build for version tracking 2026-06-09 18:08:57 +08:00
index.html fix(frontend): bundle tdesign-icons sprite locally for offline deploys 2026-04-23 18:21:49 +08:00
mcpProxy.test.ts fix(mcp): proxy server endpoints through frontend gateways 2026-09-22 17:36:03 +08:00
nginx-api-proxy.conf fix(mcp): proxy server endpoints through frontend gateways 2026-09-22 17:36:03 +08:00
nginx-http.conf feat(sandbox): add an interactive terminal and files tab beside chat (#3110) 2026-09-08 17:43:15 +08:00
nginx.conf docs: 迁移有效文档至 website-docs 并清理旧文档 (#3580) 2026-09-22 23:25:40 +08:00
package-lock.json feat(chat): open cited documents at the cited passage (#3700) 2026-09-25 13:26:16 +08:00
package.json feat(chat): open cited documents at the cited passage (#3700) 2026-09-25 13:26:16 +08:00
package.json.md5 fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling 2026-04-11 18:51:16 +08:00
pnpm-workspace.yaml fix(frontend): configure pnpm v11 build approvals in workspace file 2026-05-08 16:34:33 +08:00
tsconfig.app.json fix lint and test failures 2026-07-01 17:31:42 +08:00
tsconfig.json init commit 2025-08-05 15:08:07 +08:00
tsconfig.node.json init commit 2025-08-05 15:08:07 +08:00
vite.config.ts fix(mcp): proxy server endpoints through frontend gateways 2026-09-22 17:36:03 +08:00