Skip to content
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

Merged
merged 1 commit into from May 13, 2019

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Apr 30, 2019

Currently, setting mode to 'codemod' will:

  • Disable entity parsing in simple-html-tokenizer (ensures that parsing + printing is not lossy WRT entities)
  • 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).

@Turbo87
Copy link
Member

Turbo87 commented May 8, 2019

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).
@Turbo87 Turbo87 force-pushed the add-explicit-codemod-mode branch from 16aa365 to 458fe54 Compare May 8, 2019 07:00
@Turbo87
Copy link
Member

Turbo87 commented May 8, 2019

I rebased it and fixed the conflict :)

@Turbo87
Copy link
Member

Turbo87 commented May 9, 2019

restarted CI due to the browserstack timeout. it's 🍏 now.

@nabeelz6
Copy link

@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?

@jpike88
Copy link

jpike88 commented Mar 16, 2021

@nabeelz6 it's definitely a problem with the glimmer parser

@nabeelz6
Copy link

nabeelz6 commented Mar 16, 2021

@nabeelz6 it's definitely a problem with the glimmer parser

@jpike88 Thanks for fixing in #1284

Ref: #1283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants