Conversation
| return false; | ||
| } | ||
| if (abbreviation.includes('#')) { | ||
| return hexColorRegex.test(abbreviation) || propertyHexColorRegex.test(abbreviation); |
There was a problem hiding this comment.
I wonder whether propertyHexColorRegex should still show up. For example, bgc:#333 is valid (and expands to background-color: #333;).
There was a problem hiding this comment.
There are tests for that case and they still pass
vscode-emmet-helper/src/test/emmetHelper.test.ts
Lines 713 to 721 in 4fa2577
| if (abbreviation.startsWith('#')) { | ||
| return hexColorRegex.test(abbreviation); | ||
| } else if (commonlyUsedTags.includes(abbreviation.substring(0, abbreviation.indexOf('#')))) { | ||
| return false; |
There was a problem hiding this comment.
Not sure what this case is for, considering we're in a if (isStyleSheet(syntax)) block
There was a problem hiding this comment.
@rzhao271 The whole if (abbreviation.includes('#')) block was added as a fix for this microsoft/vscode#56082 where emmet completions would show for id selectors and that's not desired. propertyHexColorRegex regex is too restrictive causing expressions like bd1#s not being expanded so the fix is to not show completions only for id selectors of the form <element>#<id>
|
Thanks again! Merging |
Fixes microsoft/vscode#65464