From ce8b928891f81a44f2b4f1ef1f8ae3513709cdf5 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Fri, 7 Sep 2018 00:04:41 +0100 Subject: [PATCH] avoid emmet matches when word starts with a HTML tag name --- src/extension.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 99d1629..34832a3 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -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('|')}).*?\\.([^.()#>*^ \\[\\]=$@{}]*)$` ) ) }