Skip to content

fix emmet issue where wrong suggestions is promoted in html file #120480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

aliasliao
Copy link
Contributor

This PR fixes #107578

Issue

Unwanted emmet abbreviation is shown in an HTML file containing a <style> tag.
Issue Link -- #107578

Steps to repro

Type <style>input.</style> manually into an HTML file, after typing input. you'll notice input: .; is suggested.
The problem only occurs when typing css right before </style> close tag.
eg. <style> input.| </style> will not promote the wrong suggestion but <style> input.|</style> will.

Cause

Wrong boundary condition in getEmbeddedCssNodeIfAny makes getting EmbeddedCssNode for cases like <style>input.|</style> always fail.

cc / @rzhao271

Copy link
Collaborator

@rzhao271 rzhao271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@rzhao271 rzhao271 merged commit 80f1108 into microsoft:main Apr 5, 2021
@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues labels Apr 5, 2021
@rzhao271 rzhao271 added this to the April 2021 milestone Apr 5, 2021
@aliasliao aliasliao deleted the fix-get-embedded-css-util branch April 6, 2021 08:12
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emmet suggests input:Nan when input. is typed
2 participants