]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(server-renderer): avoid using `s` regex flag (#11048)
authorKevin Deng 三咲智子 <sxzz@sxzz.moe>
Tue, 4 Jun 2024 12:12:43 +0000 (20:12 +0800)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 12:12:43 +0000 (20:12 +0800)
for TS 5.5 compat

packages/server-renderer/src/helpers/ssrRenderSlot.ts

index df088e8929a72a5a7cf789c02d4053c0f8262fc4..2069591e024ffb606602de4da97c16129a4c394d 100644 (file)
@@ -108,7 +108,7 @@ export function ssrRenderSlotInner(
   }
 }
 
-const commentTestRE = /^<!--.*-->$/s
+const commentTestRE = /^<!--[\s\S]*-->$/
 const commentRE = /<!--[^]*?-->/gm
 function isComment(item: SSRBufferItem) {
   if (typeof item !== 'string' || !commentTestRE.test(item)) return false