Explorar el Código

chore(server-renderer): avoid using `s` regex flag (#11048)

for TS 5.5 compat
Kevin Deng 三咲智子 hace 1 año
padre
commit
f94568b2b7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/server-renderer/src/helpers/ssrRenderSlot.ts

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

@@ -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