diff --git a/packages/studio/src/styles/classCandidates.ts b/packages/studio/src/styles/classCandidates.ts index 10310a4d40..c1e559c002 100644 --- a/packages/studio/src/styles/classCandidates.ts +++ b/packages/studio/src/styles/classCandidates.ts @@ -253,7 +253,9 @@ function regionsAfter(mask: string, anchor: RegExp): [number, number][] { // Every string bound to `name` by an assignment in this file. A name with no literal binding // (parameter, import, call result) yields nothing, so an over-broad reference scan is safe. function boundStrings(text: string, mask: string, name: string): string[] { - const anchor = new RegExp(`\\b${escapeRegex(name)}\\b(?:\\s*:[^=;{}()[\\]]*)?\\s*=(?!=)\\s*`); + const anchor = new RegExp( + `(? stringsIn(text, mask, start, end)); }