@@ -243,19 +243,20 @@ define(function (require, exports, module) {
243243 }
244244
245245 EmmetMarkupHints . prototype . hasHints = function ( editor , implicitChar ) {
246+ if ( enabled ) {
247+ this . editor = editor ;
246248
247- this . editor = editor ;
249+ const wordObj = getWordBeforeCursor ( editor ) ;
250+ const config = createConfig ( editor ) ;
251+ if ( config && config . syntax === "html" ) {
248252
249- const wordObj = getWordBeforeCursor ( editor ) ;
250- const config = createConfig ( editor ) ;
251- if ( config && config . syntax === "html" ) {
253+ // make sure we donot have empty spaces
254+ if ( wordObj . word . trim ( ) ) {
252255
253- // make sure we donot have empty spaces
254- if ( wordObj . word . trim ( ) ) {
255-
256- const expandedAbbr = isExpandable ( editor , wordObj . word , config ) ;
257- if ( expandedAbbr ) {
258- return true ;
256+ const expandedAbbr = isExpandable ( editor , wordObj . word , config ) ;
257+ if ( expandedAbbr ) {
258+ return true ;
259+ }
259260 }
260261 }
261262 }
@@ -611,6 +612,9 @@ define(function (require, exports, module) {
611612 }
612613
613614 // the word must be either in markupSnippetsList, htmlList or it must have a positive symbol
615+ // convert to lowercase only for `htmlTags` because HTML tag names are case-insensitive,
616+ // but `markupSnippetsList` expands abbreviations in a non-tag manner,
617+ // where the expanded abbreviation is already in lowercase.
614618 if ( markupSnippetsList . includes ( word ) ||
615619 htmlTags . includes ( word . toLowerCase ( ) ) ||
616620 positiveSymbols . some ( symbol => word . includes ( symbol ) ) ) {
0 commit comments