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

If block with whitespace control is mutated during transform #155

Closed
tylerturdenpants opened this issue Oct 24, 2019 · 2 comments · Fixed by #159
Closed

If block with whitespace control is mutated during transform #155

tylerturdenpants opened this issue Oct 24, 2019 · 2 comments · Fixed by #159

Comments

@tylerturdenpants
Copy link
Contributor

Given:

{{#if foo~}}
  {{foo}}
{{/if}}

Expected:

{{#if foo~}}
  {{foo}}
{{/if}}

Actual:

{{#if foo~}}{{foo}}
{{/if}}
Copy link
Member

rwjblue commented Oct 25, 2019

Can you submit a failing test case?

Sorry, I didn't notice that #156 is that failing test case...

@rwjblue
Copy link
Member

rwjblue commented Oct 25, 2019

I created handlebars-lang/handlebars.js#1584 to make this much nicer. At the moment the text nodes after the whitespace are completely removed from the AST, so we can't easily "fix" the reported problem.

Once that PR lands (and is released) we can:

  1. update handlebars version in @glimmer/syntax
  2. tweak the codemod option details to use disableWhitespaceControl (instead of ignoreStandalone)
  3. release @glimmer/syntax
  4. update @glimmer/syntax here
  5. release an update

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 a pull request may close this issue.

2 participants