update class attribute regex (#233)
parent
b3c17cf5c9
commit
0e66dac7b7
|
@ -159,7 +159,10 @@ function provideClassAttributeCompletions(
|
||||||
end: position,
|
end: position,
|
||||||
})
|
})
|
||||||
|
|
||||||
const match = findLast(/(?:\s|:)(?:class(?:Name)?|\[ngClass\])=['"`{]/gi, str)
|
const match = findLast(
|
||||||
|
/(?:\s|:|\()(?:class(?:Name)?|\[ngClass\])=['"`{]/gi,
|
||||||
|
str
|
||||||
|
)
|
||||||
|
|
||||||
if (match === null) {
|
if (match === null) {
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -209,7 +209,7 @@ export function findClassListsInHtmlRange(
|
||||||
): DocumentClassList[] {
|
): DocumentClassList[] {
|
||||||
const text = doc.getText(range)
|
const text = doc.getText(range)
|
||||||
const matches = findAll(
|
const matches = findAll(
|
||||||
/(?:\s|:)(?:class(?:Name)?|\[ngClass\])=['"`{]/g,
|
/(?:\s|:|\()(?:class(?:Name)?|\[ngClass\])=['"`{]/g,
|
||||||
text
|
text
|
||||||
)
|
)
|
||||||
const result: DocumentClassList[] = []
|
const result: DocumentClassList[] = []
|
||||||
|
|
Loading…
Reference in New Issue