-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add codemod
mode for @glimmer/syntax preparse.
#938
Conversation
fb564f2
to
16aa365
Compare
looks like #941 caused a conflict here, sorry :( |
Currently, setting `mode` to `'codemod'` will: * Disable `entity` parsing in simple-html-tokenizer (ensures that parsing + printing is not lossy) * Enable `ignoreStandalone` mode in handlebars parser (ensures that standalone whitespace after a block opening or closing is not stripped). In the future we can do other things to make the codemod world even better, but this is a really good first step (IMHO).
16aa365
to
458fe54
Compare
I rebased it and fixed the conflict :) |
restarted CI due to the browserstack timeout. it's 🍏 now. |
@rwjblue I commented on the prettier repo but it seems that HTML entity numbers are still being converted: jgwhite/prettier#1 (comment) Is this something @glimmer/syntax could address or we'd have to update prettier for? |
@nabeelz6 it's definitely a problem with the glimmer parser |
Currently, setting
mode
to'codemod'
will:entity
parsing in simple-html-tokenizer (ensures that parsing + printing is not lossy WRT entities)ignoreStandalone
mode in handlebars parser (ensures that standalone whitespace after a block opening or closing is not stripped).In the future we can do other things to make the codemod world even better, but this is a really good first step (IMHO).