fix(ssr): fix hydration mismatch caused by multi-line comments inside slot

fix #5355
This commit is contained in:
Evan You
2022-05-19 11:36:29 +08:00
parent 516bc548fc
commit e1bc2681ef
2 changed files with 31 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ export function ssrRenderSlotInner(
}
}
const commentRE = /<!--.*?-->/g
const commentRE = /<!--[^]*?-->/gm
function isComment(item: SSRBufferItem) {
return (
typeof item === 'string' &&