Skip to content

Commit c8597ed

Browse files
committed
fix: getClassNamesInClassList to ignore newlines and spaces
1 parent 5ff8448 commit c8597ed

File tree

1 file changed

+1
-1
lines changed
  • packages/tailwindcss-language-service/src/util

1 file changed

+1
-1
lines changed

packages/tailwindcss-language-service/src/util/find.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function getClassNamesInClassList(
4040
const names: DocumentClassName[] = []
4141
let index = 0
4242
for (let i = 0; i < parts.length; i++) {
43-
if (i % 2 === 0 && !blocklist.includes(parts[i])) {
43+
if (i % 2 === 0 && parts[i] && !blocklist.includes(parts[i])) {
4444
const start = indexToPosition(classList, index)
4545
const end = indexToPosition(classList, index + parts[i].length)
4646
names.push({

0 commit comments

Comments
 (0)