Skip to content

Commit

Permalink
refactor(vite-plugins): optimize markdown code
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Dec 4, 2024
1 parent 20118e8 commit 6539415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/varlet-vite-plugins/src/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function htmlWrapper(html: string) {
const matches = html.matchAll(/<h3>(.*?)<\/h3>/g)
const hGroup = html
.replace(/<h3>/g, () => {
const hash = transformHash(matches.next().value[1])
const hash = transformHash(matches.next().value![1])

return `:::<h3 id="${hash}"><router-link to="#${hash}">#</router-link>`
})
Expand Down

0 comments on commit 6539415

Please sign in to comment.