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

Unstable object expansion within function call #821

Closed
vjeux opened this issue Feb 27, 2017 · 5 comments
Closed

Unstable object expansion within function call #821

vjeux opened this issue Feb 27, 2017 · 5 comments
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program

Comments

@vjeux vjeux added the type:bug Issues identifying ugly output, or a defect in the program label Feb 27, 2017
@jlongster
Copy link
Member

So it only happens within string templates?

@vjeux
Copy link
Contributor Author

vjeux commented Feb 27, 2017

As far as I know, yes. I'm guessing it's due to the hackery we do with the removal of softlines and forcing objects to be expanded.

@jlongster
Copy link
Member

Most likely, yeah.

josephfrazier added a commit to josephfrazier/prettier that referenced this issue May 22, 2017
josephfrazier added a commit to josephfrazier/prettier that referenced this issue May 22, 2017
vjeux pushed a commit that referenced this issue May 22, 2017
* Add tests for newlines in template literals

These are related to the following issues:

* #1662
* #821
* #1183
* #1626

* Don't removeLines() from TemplateLiteral quasis

This fixes #1662
and fixes #1626

It also affects #821 and
#1183
@josephfrazier
Copy link
Collaborator

I didn't close this from the commit message of 374a682, but I think it's actually fixed now:

f(`${{
  a: 4,
  b: 9,
}}`);

becomes:

f(
  `${{
    a: 4,
    b: 9
  }}`
);

which stays stable.

@vjeux
Copy link
Contributor Author

vjeux commented May 22, 2017

Nice!

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jul 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants