Skip to content

Commit

Permalink
fix: escape {{ in code (#1316) (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Feb 21, 2024
1 parent 11009c1 commit 900b37c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/slidev/node/plugins/markdown.ts
Expand Up @@ -260,10 +260,10 @@ export function transformPlantUml(md: string, server: string): string {
}

/**
* Escape `{{}}` in code block to prevent Vue interpret it, #99
* Escape `{{` in code block to prevent Vue interpret it, #99, #1316
*/
export function escapeVueInCode(md: string) {
return md.replace(/{{(.*?)}}/g, '{{$1}}')
return md.replace(/{{/g, '{{')
}

export async function loadShikiSetups(
Expand Down

0 comments on commit 900b37c

Please sign in to comment.