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

heex template highlighting breaks when there's a space at the end of an attribute #555

Open
clemensm opened this issue Nov 4, 2021 · 2 comments

Comments

@clemensm
Copy link

clemensm commented Nov 4, 2021

Hi everyone

I've tested this on a "raw" vim with only the vim-elixir plugin, to make sure that no other plugins are interfering.

The bug is that adding a single space at the end of an attribute breaks the highlighting, as can bee seen here (the closing div is the wrong color):

broken

And this is what it should look like:

correct

This is obviously not an issue for the given example, but I get the same error when I have more complicated attributes that embed some elixir code, like e.g.:

<div class={"some classes #{if @value, do: "another-class"}"}>

this will trigger the same problems.

@martinvium
Copy link

martinvium commented Nov 6, 2021

Appears to be any {""} attribute with a space in it e.g. class={"a #{b}"} breaks while class={"a#{b}"} works.

@joeesteves
Copy link
Contributor

Hi Guys, have the same problem after migrating to phoenix 1.6 and have to use heex. I make a workaround to temp improve syntax 👇

#557

If anyone have vim-scripting experience I'm open to comments and suggestion on how to make this the right way.

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

No branches or pull requests

3 participants