Skip to content

Commit b4ab47a

Browse files
committed
fix: mustache escape, close #151
1 parent ef02ac6 commit b4ab47a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/slidev/node/plugins/markdown.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import Katex from './markdown-it-katex'
99
import { loadSetups } from './setupNode'
1010
import Prism from './markdown-it-prism'
1111
import Shiki, { resolveShikiOptions } from './markdown-it-shiki'
12-
import type { KatexOptions } from 'katex'
13-
import type MarkdownIt from 'markdown-it'
1412
import type { ShikiOptions } from '@slidev/types'
13+
import type MarkdownIt from 'markdown-it'
14+
import type { KatexOptions } from 'katex'
1515

1616
const DEFAULT_SHIKI_OPTIONS: ShikiOptions = {
1717
theme: {
@@ -155,5 +155,5 @@ export function transformMermaid(md: string): string {
155155
* Escape `{{}}` in code block to prevent Vue interpret it, #99
156156
*/
157157
export function escapeVueInCode(md: string) {
158-
return md.replace(/{{(.*)}}/g, '{{$1}}')
158+
return md.replace(/{{(.*?)}}/g, '{{$1}}')
159159
}

0 commit comments

Comments
 (0)