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