Skip to content

Commit 2a6b277

Browse files
committed
Run positive matches less often
1 parent 4a98c04 commit 2a6b277

File tree

1 file changed

+11
-9
lines changed
  • packages/tailwindcss-language-server/src

1 file changed

+11
-9
lines changed

packages/tailwindcss-language-server/src/tw.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -997,18 +997,20 @@ export class TW {
997997
}
998998
}
999999

1000-
if (picomatch(pattern, { dot: true })(fsPath) && selector.priority < matchedPriority) {
1001-
matchedProject = project
1002-
matchedPriority = selector.priority
1000+
if (selector.priority < matchedPriority) {
1001+
if (picomatch(pattern, { dot: true })(fsPath)) {
1002+
matchedProject = project
1003+
matchedPriority = selector.priority
10031004

1004-
continue
1005-
}
1005+
continue
1006+
}
10061007

1007-
if (picomatch(pattern, { dot: true })(normalPath) && selector.priority < matchedPriority) {
1008-
matchedProject = project
1009-
matchedPriority = selector.priority
1008+
if (picomatch(pattern, { dot: true })(normalPath)) {
1009+
matchedProject = project
1010+
matchedPriority = selector.priority
10101011

1011-
continue
1012+
continue
1013+
}
10121014
}
10131015
}
10141016
}

0 commit comments

Comments
 (0)