update class attribute regex (#125)
parent
cd444aba6c
commit
cfd4e4fd07
|
@ -126,7 +126,7 @@ function provideClassAttributeCompletions(
|
||||||
end: position,
|
end: position,
|
||||||
})
|
})
|
||||||
|
|
||||||
const match = findLast(/[\s:]class(?:Name)?=['"`{]/gi, str)
|
const match = findLast(/(?:\b|:)class(?:Name)?=['"`{]/gi, str)
|
||||||
|
|
||||||
if (match === null) {
|
if (match === null) {
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -101,7 +101,7 @@ export function findClassListsInHtmlRange(
|
||||||
range: Range
|
range: Range
|
||||||
): DocumentClassList[] {
|
): DocumentClassList[] {
|
||||||
const text = doc.getText(range)
|
const text = doc.getText(range)
|
||||||
const matches = findAll(/[\s:]class(?:Name)?=['"`{]/g, text)
|
const matches = findAll(/(?:\b|:)class(?:Name)?=['"`{]/g, text)
|
||||||
const result: DocumentClassList[] = []
|
const result: DocumentClassList[] = []
|
||||||
|
|
||||||
matches.forEach((match) => {
|
matches.forEach((match) => {
|
||||||
|
|
Loading…
Reference in New Issue