-
Notifications
You must be signed in to change notification settings - Fork 311
Prioritize highlight of command names, prevent bleed from aligned nested tokens #989
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
Prioritize highlight of command names, prevent bleed from aligned nested tokens #989
Conversation
reference PowerShell#836, specifically handles parameter token that is flagged as a command name, it is really a command name.
When a nested token ends together with the parent token, the signal would be lost, and the rest of the statement would be highlighted as the parent.
I added another commit to complete what can be fixed in #836, where nested tokens would bleed the parent tokens color unto the rest of the statement, if the last nested token ended together with the parent token. In the case of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test? I'm not sure if it's easy to do so though ...
I have added a commit that implements two test scenarios, each of which attempts to test for the two items addressed above under slightly different scenarios. |
Add 2 tests to RenderTests, both tests simultaneously check for priority to highlight command names, and check for highlight bleed from expandable token which has a nested token that ends together with the parent token.
2789f32
to
2062ead
Compare
I force pushed as my previous commit was trying to change (remove) the BOM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Referencing #836,