Fix `classRegex` offset (#846)
parent
5faf811489
commit
4c702acf85
|
@ -148,7 +148,7 @@ async function findCustomClassLists(
|
||||||
let containerMatch: ReturnType<Regex['exec']>
|
let containerMatch: ReturnType<Regex['exec']>
|
||||||
|
|
||||||
while ((containerMatch = containerRegex.exec(text)) !== null) {
|
while ((containerMatch = containerRegex.exec(text)) !== null) {
|
||||||
const searchStart = doc.offsetAt(range?.start || { line: 0, character: 0 })
|
const searchStart = doc.offsetAt({ line: 0, character: 0 })
|
||||||
const matchStart = searchStart + containerMatch.index[1]
|
const matchStart = searchStart + containerMatch.index[1]
|
||||||
const matchEnd = matchStart + containerMatch[1].length
|
const matchEnd = matchStart + containerMatch[1].length
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue