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: improve name key match #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gardar
Copy link

@gardar gardar commented Oct 18, 2023

This refines the matching for the name key to only target instances where it's an item in a list. This change significantly reduces the likelihood of false positives.

Related Issue: #109

The highlighting now looks like this:
image

However, there are still some edge cases to be aware of:
image

Which you could work around like so:
image

Signed-off-by: gardar <gardar@users.noreply.github.com>
@pearofducks
Copy link
Owner

I haven't merged this yet, I'm taking a bit to think about it.

The regex here also grabs the - which I really don't like - and I'm also hesitant to introduce any regex - YAML is pretty flexible and there's all sorts of bonkers things people could get up to, I'd rather stick to extending what the YAML syntax file provides than start bashing that with custom regex/selections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants