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