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 mis-highlight for conditionals detected as a block #116

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Mar 25, 2024

Looking at the screenshots from #115, I noticed that the local keyword was highlighted in a different way than in the current vscode-hcl grammar.

I traced this back to #94, which changed the recognition of blocks. I made this a little less permissive by disallowing ? in block labels. This fixes the case where a ternary operator followed by an object is recognized as a block.

CleanShot 2024-03-25 at 18 07 56@2x

UX Before

CleanShot 2024-03-25 at 18 28 16@2x

UX After

CleanShot 2024-03-25 at 18 27 32@2x

@dbanck dbanck added the bug Something isn't working label Mar 25, 2024
@dbanck dbanck requested a review from a team as a code owner March 25, 2024 17:31
@dbanck dbanck merged commit ab4a9e8 into main Mar 26, 2024
5 checks passed
@dbanck dbanck deleted the b-improve-block-detection branch March 26, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants