( content: string, theme: ThemeName, highlight: CliHighlight | null = null, )
| 34 | } |
| 35 | |
| 36 | export function applyMarkdown( |
| 37 | content: string, |
| 38 | theme: ThemeName, |
| 39 | highlight: CliHighlight | null = null, |
| 40 | ): string { |
| 41 | configureMarked() |
| 42 | return marked |
| 43 | .lexer(stripPromptXMLTags(content)) |
| 44 | .map(_ => formatToken(_, theme, 0, null, null, highlight)) |
| 45 | .join('') |
| 46 | .trim() |
| 47 | } |
| 48 | |
| 49 | export function formatToken( |
| 50 | token: Token, |
no test coverage detected