Skip to content

Commit 900b37c

Browse files
authored
fix: escape {{ in code (#1316) (#1317)
1 parent 11009c1 commit 900b37c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/slidev/node/plugins/markdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ export function transformPlantUml(md: string, server: string): string {
260260
}
261261

262262
/**
263-
* Escape `{{}}` in code block to prevent Vue interpret it, #99
263+
* Escape `{{` in code block to prevent Vue interpret it, #99, #1316
264264
*/
265265
export function escapeVueInCode(md: string) {
266-
return md.replace(/{{(.*?)}}/g, '{{$1}}')
266+
return md.replace(/{{/g, '{{')
267267
}
268268

269269
export async function loadShikiSetups(

0 commit comments

Comments
 (0)