-
Notifications
You must be signed in to change notification settings - Fork 31
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
entities are being replaced with characters #48
Comments
FWIW, this is a large issue over in prettier's side too (changing |
Point away. I'm interested. |
@rwjblue I'd be interested in these pointers too. Having worked with HBS codemods a little, it's clear that there is an opportunity to make some fundamental changes which will enable much more comprehensive tooling possible. @patocallaghan and I are keen on helping get tools like prettier for hbs into a great place and addressing these fundamental issue seems like a good first step. |
Sorry :( I did a first pass here: glimmerjs/glimmer-vm#938 |
This PR fixes the entity issue (nicely), and makes it simpler to deal with whitespace after handlebars block opening/closing. |
@rwjblue will a release be cut soon? |
Needs review (I pinged folks), but shouldn't take too long to land + release once its been reviewed. |
Nice one! |
We should setup a time to brainstorm on the general problem though. The fix I submitted will only help some of the issues, and we will continue to have to fix things in convoluted ways due to the Handlebars parser being so lossy. Things like I think we will ultimately need to do a custom parser (we already differ from Handlebars in enough ways that I don't think this is terrible) that has better semantics around preserving enough info in the AST to be able to print properly. This would help basically everyone in the space (prettier / glimmer / ember / template-lint / codemods / etc could all use it)... |
@GavinJoyce whoever has the free time to take this up should take it up. I can create releases, so let me know when I can help. |
👍 That would be great. I'll ping you on discord to set something up |
Just pinging here to ask how this is moving along :) |
I published the update to @glimmer/syntax to allow opting in to "codemod" mode as of 0.41.0, if we update to that (and tweak the options we pass) we should be able to completely avoid issues with these HTML entity characters. |
I've a PR to update @glimmer/syntax here https://github.com/rajasegar/ember-angle-brackets-codemod/pull/50 |
Input of
< > ×
is resulting in output of< > ×
related issue: glimmerjs/glimmer-vm#833
The text was updated successfully, but these errors were encountered: