avoid emmet matches when word starts with a HTML tag name

master
Brad Cornes 2018-09-07 00:04:41 +01:00
parent c29d0a064b
commit ce8b928891
1 changed files with 3 additions and 3 deletions

View File

@ -158,9 +158,9 @@ function createCompletionItemProvider({
if (!matches) {
matches = currentWord.match(
new RegExp(
`^([A-Z][a-zA-Z0-9]*|[a-z][a-z0-9]*-[a-z0-9-]+|${htmlElements.join(
'|'
)}).*?\\.([^.()#>*^ \\[\\]=$@{}]*)$`
`^([A-Z][a-zA-Z0-9]*|[a-z][a-z0-9]*-[a-z0-9-]+|${htmlElements
.map(x => `${x}\\b`)
.join('|')}).*?\\.([^.()#>*^ \\[\\]=$@{}]*)$`
)
)
}