Skip to content

Commit 5a0d994

Browse files
committed
fix: style tag transform leak
1 parent c127632 commit 5a0d994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/slidev/node/plugins/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function transformPageCSS(md: string, id: string) {
121121
const result = md.replace(
122122
/(\n<style[^>]*?>)([\s\S]+?)(<\/style>)/g,
123123
(full, start, css, end) => {
124-
const index = md.search(full)
124+
const index = md.indexOf(full)
125125
// don't replace `<style>` inside code blocks, #101
126126
if (index < 0 || codeblocks.some(([s, e]) => s <= index && index <= e))
127127
return full

0 commit comments

Comments
 (0)