diff --git a/packages/shiki/src/renderer.ts b/packages/shiki/src/renderer.ts index bc6a948d8..48fc37874 100644 --- a/packages/shiki/src/renderer.ts +++ b/packages/shiki/src/renderer.ts @@ -33,5 +33,5 @@ export function renderToHtml(lines: IThemedToken[][], options: HtmlRendererOptio } function escapeHtml(html: string) { - return html.replace(//g, '>') + return html.replace(/&/g, '&').replace(//g, '>') } \ No newline at end of file