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

highlighting tailwind class directives #1

Closed
shaynem opened this issue Jun 13, 2022 · 3 comments · Fixed by #3
Closed

highlighting tailwind class directives #1

shaynem opened this issue Jun 13, 2022 · 3 comments · Fixed by #3

Comments

@shaynem
Copy link

shaynem commented Jun 13, 2022

First, I"m happy with seeing highlighting instead of a single color, so thank you for your work!

It's fairly obvious why the below happens, but just pointing it out.

image

Possible to limit parsing to x-*= @data-name= :data-name= maybe?

I have a feeling the x- directive is being removed in future Alpine releases however.

@pcbowers
Copy link
Owner

@shaynem That's a good point! In reality, it's really not so much an issue with the grammar selection as it is with where the grammar is being injected. By changing the injection selector from L:text.html which allows the syntax to be injected anywhere to L:meta.tag -meta.attribute which only allows it to be injected within an HTML tag but not within the attribute itself, you get proper highlighting.

@pcbowers
Copy link
Owner

I just published a patch to the extension that implements this change. It should update automatically and fix this issue!

@Random72IsTaken
Copy link

It seems that it's still a problem for anything other than HTML files.

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 a pull request may close this issue.

3 participants