diff --git a/packages/svelte/src/compiler/migrate/index.js b/packages/svelte/src/compiler/migrate/index.js index bb2ba1d5f7..18fdadeb90 100644 --- a/packages/svelte/src/compiler/migrate/index.js +++ b/packages/svelte/src/compiler/migrate/index.js @@ -322,7 +322,7 @@ export function migrate(source, { filename } = {}) { .toString() // for some reason replacing the magic string doesn't work .replaceAll( - /(?<=]*>[\s\S]*?:(?:is|not|where|has)\()([^)]+)(?=[\s\S]*?<\/style>)/gm, + /(?<=]*>[\s\S]*?:(?:is|not|where|has)\()([\s\S]+)(?=\)[\s\S]*?<\/style>)/gm, ':global($1)' ) };