allow whitespace around class attribute `=` (#426)
parent
8c299f96a9
commit
d641b8eb2b
|
@ -338,7 +338,7 @@ function provideClassAttributeCompletions(
|
|||
end: position,
|
||||
})
|
||||
|
||||
const match = findLast(/(?:\s|:|\()(?:class(?:Name)?|\[ngClass\])=['"`{]/gi, str)
|
||||
const match = findLast(/(?:\s|:|\()(?:class(?:Name)?|\[ngClass\])\s*=\s*['"`{]/gi, str)
|
||||
|
||||
if (match === null) {
|
||||
return null
|
||||
|
|
|
@ -174,7 +174,7 @@ async function findCustomClassLists(
|
|||
|
||||
export function findClassListsInHtmlRange(doc: TextDocument, range?: Range): DocumentClassList[] {
|
||||
const text = doc.getText(range)
|
||||
const matches = findAll(/(?:\s|:|\()(?:class(?:Name)?|\[ngClass\])=['"`{]/g, text)
|
||||
const matches = findAll(/(?:\s|:|\()(?:class(?:Name)?|\[ngClass\])\s*=\s*['"`{]/gi, text)
|
||||
const result: DocumentClassList[] = []
|
||||
|
||||
matches.forEach((match) => {
|
||||
|
|
Loading…
Reference in New Issue