Skip to content

Commit 4c702ac

Browse files
authored
Fix classRegex offset (tailwindlabs#846)
1 parent 5faf811 commit 4c702ac

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ async function findCustomClassLists(
148148
let containerMatch: ReturnType<Regex['exec']>
149149

150150
while ((containerMatch = containerRegex.exec(text)) !== null) {
151-
const searchStart = doc.offsetAt(range?.start || { line: 0, character: 0 })
151+
const searchStart = doc.offsetAt({ line: 0, character: 0 })
152152
const matchStart = searchStart + containerMatch.index[1]
153153
const matchEnd = matchStart + containerMatch[1].length
154154

0 commit comments

Comments
 (0)