How can we add support clean ups in ERB file #665
Bennet-Sunder
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For the below Erb code snippet
The corresponding tree generated by (https://github.com/tree-sitter/tree-sitter-embedded-template) parser is
The
code
here refers to the the ruby code andcontent
is the html content. However, the parser doesn't recognisecontent
node as a sibling of thecode
node. Allcode
andcontent
nodes are considered siblings of the roottemplate
node.For a cleanup perspective this isn't helpful since it parses individual ruby lines without getting the nested sibling content nodes.
From (https://tree-sitter.github.io/tree-sitter/using-parsers#multi-language-documents)
Any thoughts on if it is possible to support cleanup for Erb files in the existing polyglot piranha implementation?
Beta Was this translation helpful? Give feedback.
All reactions