()
| 19 | let markedConfigured = false |
| 20 | |
| 21 | export function configureMarked(): void { |
| 22 | if (markedConfigured) return |
| 23 | markedConfigured = true |
| 24 | |
| 25 | // Disable strikethrough parsing - the model often uses ~ for "approximate" |
| 26 | // (e.g., ~100) and rarely intends actual strikethrough formatting |
| 27 | marked.use({ |
| 28 | tokenizer: { |
| 29 | del() { |
| 30 | return undefined |
| 31 | }, |
| 32 | }, |
| 33 | }) |
| 34 | } |
| 35 | |
| 36 | export function applyMarkdown( |
| 37 | content: string, |
no outgoing calls
no test coverage detected