Skip to content
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

Fix highlighting for attribute access with a dash #933

Merged
merged 3 commits into from
Feb 11, 2022

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Feb 10, 2022

This PR fixes the syntax highlighting for attribute access containing a dash (-) and the splat and indices detection.

UX Impact

Variables with dashes

Before
CleanShot 2022-02-10 at 12 06 49

After
CleanShot 2022-02-10 at 12 07 02

Splat & Indices

Before
CleanShot 2022-02-10 at 12 08 22

After
CleanShot 2022-02-10 at 12 08 02

Fixes #927

The dash hasn't been a part of the attribute access end capture.
Furthermore, we didn't correctly detect splat and indices on
attribute access notation.
@dbanck dbanck added bug Something isn't working syntax labels Feb 10, 2022
@dbanck dbanck requested a review from a team February 10, 2022 11:10
@dbanck dbanck merged commit 2da032c into main Feb 11, 2022
@dbanck dbanck deleted the bug-variable-dash-syntax branch February 11, 2022 10:36
@jpogran jpogran added this to the 2.20.0 milestone Feb 18, 2022
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong highlighting for identifiers with dash
2 participants