Skip to content

Commit 3ffa721

Browse files
committed
fix: fixed \< replace failed edge case in markdown
close #1410
1 parent 58de272 commit 3ffa721

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vue-typescript/src/plugins/file-md.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default function (): VueLanguagePlugin {
129129
// inline code block
130130
.replace(/\`([\s\S]*?)\`/g, match => `\`${' '.repeat(match.length - 2)}\``)
131131
// # \<script setup>
132-
.replace(/\\\<([\s\S]*?)\n/g, match => ' '.repeat(match.length))
132+
.replace(/\\\<([\s\S]*?)\n?/g, match => ' '.repeat(match.length))
133133
// markdown line
134134
.replace(/\[([\s\S]*?)\]\(([\s\S]*?)\)/g, match => ' '.repeat(match.length)),
135135
{

0 commit comments

Comments
 (0)