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

Skip newlines around inline #__PURE__ annotations #11133

Merged
merged 2 commits into from Feb 13, 2020

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Feb 12, 2020

Q                       A
Fixed Issues? Fixes  #11126 (comment)
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This PR is mostly to improve the output readability, since the unindented newlines looked really bad.

I special-cased /*#__PURE__*/ annotations because I think that we should preserve the old behavior for normal comments.

@nicolo-ribaudo nicolo-ribaudo added the PR: Polish 💅 A type of pull request used for our changelog categories label Feb 12, 2020
this._printComment(
comments[0],
// Keep newlines if the comment marks a standalone call
this._buf.hasContent() && !this.endsWith("\n"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolo-ribaudo nicolo-ribaudo merged commit d21e221 into babel:master Feb 13, 2020
rajasekarm pushed a commit to rajasekarm/babel that referenced this pull request Feb 17, 2020
* Skip newlines around #__PURE__ annotations

* Update tests
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 15, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants