fix(ui): use oniguruma wasm engine for markdown code highlighting
The JS regex engine in @pierre/diffs can cause catastrophic backtracking on certain TextMate grammars (e.g. powershell), freezing the main thread. Switch to a dedicated oniguruma WASM-based highlighter for markdown code blocks. Diff components still use the existing @pierre/diffs highlighter. Add try/catch fallback and regression tests.
This commit is contained in:
parent
a598ecac1f
commit
96a2ca3c7e
3 changed files with 184 additions and 13 deletions
|
|
@ -24,6 +24,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"typecheck": "tsgo --noEmit",
|
||||
"test": "bun test ./src",
|
||||
"dev": "vite",
|
||||
"generate:tailwind": "bun run script/tailwind.ts"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue