-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Line breaks not handled gracefully #120
Comments
Hi @hotmeteor, I found out that the plugin gets confused by the dynamic binding. When you remove the colon from the params and reformat the file, it works as expected. Dynamic binding is only available for Tags and as for now the plugin operates on a defined set of Tags provided by Statamic and doesn't know Tags coming from Addons like in this case. I need to find a way to make the internal list of Tags dynamic taking all Tags in a project into account. Thanks for bringing this issue up :-) |
This happened because the lexer got confused by the unknown Tag `imagekit` which comes from an addon. It was lexed and parsed as a variable and the syntax does not allow dynamic bindings for variables, only for Tags. This PR introduces an `T_UNKOWN_TAG` token, which is returned by the lexer when he sees an Identifier which is followed by one or more whitespaces and a colon. The formatting issues was just a side effect of the wrong parsing. Closes #120
This happened because the lexer got confused by the unknown Tag `imagekit` which comes from an addon. It was lexed and parsed as a variable and the syntax does not allow dynamic bindings for variables, only for Tags. This PR introduces an `T_UNKOWN_TAG` token, which is returned by the lexer when he sees an Identifier which is followed by one or more whitespaces and a colon. The formatting issues was just a side effect of the wrong parsing. Closes #120
This happened because the lexer got confused by the unknown Tag `imagekit` which comes from an addon. It was lexed and parsed as a variable and the syntax does not allow dynamic bindings for variables, only for Tags. This PR introduces an `T_UNKOWN_TAG` token, which is returned by the lexer when he sees an Identifier which is followed by one or more whitespaces and a colon. The formatting issues was just a side effect of the wrong parsing. Closes #120
Hi @hotmeteor, can you provide an example of how the above snippet should be formatted in your opinion? Thanks in advance! |
Great plugin, thanks for the work on it!
One UX issue I often hit is the way the Antlers tags are formatted. The biggest issues I hit are:
I've included some code below so you can get a sense of what I mean.
This obviously isn't a breaking issue but visually it makes it tough to ensure my tags are configured and balanced correctly.
Thanks!
The text was updated successfully, but these errors were encountered: