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

Make bracket-matcher Happy #120

Merged
merged 3 commits into from
Aug 4, 2023
Merged

Conversation

confused-Techie
Copy link
Collaborator

I've detailed much more on #117 what the exact issue is.

But essentially, there were scopes expected to be present on the text of script from <script> that was only applied to the < and > causing bracket-matcher to only highlight the text if the cursor was near those ending characters, rather than on the entire piece of text.

While I did talk with Pulsar maintainers if the best solution was to modify how bracket-matcher handles this, we came to the conclusion that it would make the most sense to instead fix the scopes being supplied by this grammar instead.

So this PR fixes the underlighting of both script and style by wrapping the full captures in the scope that was expected of bracket-matcher while leaving the internal captures alone, to keep syntax highlighting as expected.

Before

image

After

image


Resolves #117

@zhaolinlau
Copy link

Thanks!

@confused-Techie confused-Techie merged commit f5ea178 into master Aug 4, 2023
3 checks passed
@confused-Techie confused-Techie deleted the make-bracket-matcher-happy branch August 4, 2023 03:43
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.

<script> and <style> not being highlighted when the cursor is inside the tags
2 participants