WeKnora/frontend/src
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
..
api feat(auth): 新增仅限邀请注册档位 (#3900) 2026-09-30 13:32:55 +08:00
assets fix(frontend): normalize style guard paths 2026-09-29 17:16:54 +08:00
components fix(frontend): render single tilde literally instead of GFM strikethrough (#3963) 2026-10-08 13:04:36 +08:00
composables fix(citations): 修复原文定位、高亮范围与 DocReader 启动失败 (#3794) 2026-09-27 20:32:26 +08:00
config revert: take the plugin system back out of main 2026-09-26 14:58:18 +08:00
directives fix(chat): restore shared workspace images after stream completion (#3523) 2026-09-22 00:16:58 +08:00
hooks feat: add configurable sorting to document and resource lists (#3318) 2026-09-23 12:00:21 +08:00
i18n feat(auth): 新增仅限邀请注册档位 (#3900) 2026-09-30 13:32:55 +08:00
router refactor(frontend): drop TTL resource caches and remove duplicate startup requests (#3562) 2026-09-25 22:22:48 +08:00
stores fix(chat): clear stale file and tool selections on session restore (#3802) 2026-10-08 01:24:43 +08:00
types revert: take the plugin system back out of main 2026-09-26 14:58:18 +08:00
utils fix(frontend): render single tilde literally instead of GFM strikethrough (#3963) 2026-10-08 13:04:36 +08:00
views fix(frontend): render single tilde literally instead of GFM strikethrough (#3963) 2026-10-08 13:04:36 +08:00
wailsjs feat(sandbox): run unpinned Lite sessions on the host OS sandbox (#3549) 2026-09-22 19:35:03 +08:00
App.vue feat(i18n): add Japanese (ja-JP) locale support (#3080) 2026-09-07 19:20:41 +08:00
embed-main.ts feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
main.ts refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00