-
Notifications
You must be signed in to change notification settings - Fork 3
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
Twig component html syntax #17
Comments
Interesting, I'll try to implement this soon |
I had a look on this and... it's really not easy. |
Sure, nevermind. I've tried to create html injections for this, but without split grammar it seemed impossible. My initial idea was to modify attribute value in injection by adding curly braces around that statement, but didn't find any solution. |
I've ended up with injecting javascript for those component attributes. It's not perfect and might be confusing, but it's better than nothing. At least for basic highlighting. "solution" ; after/queries/html/injections.scm
;; extends
(element
(_ (tag_name) @_tag
(#lua-match? @_tag "^twig:%a")
(attribute
(attribute_name) @_attr
(#lua-match? @_attr "^:%a")
(quoted_attribute_value
(attribute_value) @injection.content)
(#set! injection.language "javascript")
))) |
Interesting workaround! |
Hi, are there any plans to support Component HTML Syntax?
Specifically "injecting" output_directive in quoted html attributes for something like this
<twig:foo :bar="variable|filter1|filter2" />
.The text was updated successfully, but these errors were encountered: