Skip to content

Commit ce8b928

Browse files
committed
avoid emmet matches when word starts with a HTML tag name
1 parent c29d0a0 commit ce8b928

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/extension.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ function createCompletionItemProvider({
158158
if (!matches) {
159159
matches = currentWord.match(
160160
new RegExp(
161-
`^([A-Z][a-zA-Z0-9]*|[a-z][a-z0-9]*-[a-z0-9-]+|${htmlElements.join(
162-
'|'
163-
)}).*?\\.([^.()#>*^ \\[\\]=$@{}]*)$`
161+
`^([A-Z][a-zA-Z0-9]*|[a-z][a-z0-9]*-[a-z0-9-]+|${htmlElements
162+
.map(x => `${x}\\b`)
163+
.join('|')}).*?\\.([^.()#>*^ \\[\\]=$@{}]*)$`
164164
)
165165
)
166166
}

0 commit comments

Comments
 (0)