Skip to content

Commit

Permalink
fix: fixed \< replace failed edge case in markdown
Browse files Browse the repository at this point in the history
close #1410
  • Loading branch information
johnsoncodehk committed Jun 7, 2022
1 parent 58de272 commit 3ffa721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-typescript/src/plugins/file-md.ts
Expand Up @@ -129,7 +129,7 @@ export default function (): VueLanguagePlugin {
// inline code block
.replace(/\`([\s\S]*?)\`/g, match => `\`${' '.repeat(match.length - 2)}\``)
// # \<script setup>
.replace(/\\\<([\s\S]*?)\n/g, match => ' '.repeat(match.length))
.replace(/\\\<([\s\S]*?)\n?/g, match => ' '.repeat(match.length))
// markdown line
.replace(/\[([\s\S]*?)\]\(([\s\S]*?)\)/g, match => ' '.repeat(match.length)),
{
Expand Down

0 comments on commit 3ffa721

Please sign in to comment.