update class attribute regex

master
Brad Cornes 2020-11-24 15:45:08 +00:00
parent 99febcd4c0
commit e6a371921f
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ function provideClassAttributeCompletions(
end: position, end: position,
}) })
const match = findLast(/(?:\b|:)class(?:Name)?=['"`{]/gi, str) const match = findLast(/(?:\s|:)class(?:Name)?=['"`{]/gi, str)
if (match === null) { if (match === null) {
return null return null

View File

@ -135,7 +135,7 @@ export function findClassListsInHtmlRange(
range?: Range range?: Range
): DocumentClassList[] { ): DocumentClassList[] {
const text = doc.getText(range) const text = doc.getText(range)
const matches = findAll(/(?:\b|:)class(?:Name)?=['"`{]/g, text) const matches = findAll(/(?:\s|:)class(?:Name)?=['"`{]/g, text)
const result: DocumentClassList[] = [] const result: DocumentClassList[] = []
matches.forEach((match) => { matches.forEach((match) => {