Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
fix(vitepress-twoslash): escape Vue syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 16, 2024
1 parent 9305f06 commit ef7b614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vitepress-plugin-twoslash/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function transformerTwoslash(options: VitePressPluginTwoslashOptions = {}

return twoslash.preprocess!.call(this, code, options)
},
postprocess(html, options) {
if (this.meta.twoslash && options.lang === 'vue')
postprocess(html) {
if (this.meta.twoslash)
return html.replace(/{/g, '{')
},
}
Expand Down

0 comments on commit ef7b614

Please sign in to comment.