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

Fix printing #29

Merged
merged 1 commit into from
Jul 31, 2015
Merged

Fix printing #29

merged 1 commit into from
Jul 31, 2015

Conversation

fkling
Copy link
Contributor

@fkling fkling commented Jul 31, 2015

There have been multiple reports about the printed source missing trailing line breaks. The reason for the line break missing is that this information is contained in the File node, which is returned by
recast.parse.
However, because we build a node collection from the Program node instead of the File node, we are loosing this information.
Using the File node fixes the issue and doesn't seem to break any existing functionality.

@cpojer
Copy link
Contributor

cpojer commented Jul 31, 2015

👍

Seems like Travis is unhappy with the timeout, as always?

I originally followed @voideanvalue's suggestion that this should not be in recast, but given that it already seems to handle this it makes a lot of sense.

@fkling
Copy link
Contributor Author

fkling commented Jul 31, 2015

Not again... I will just set the timeout to a minute :P

There have been multiple reports about the printed source missing
trailing line breaks. The reason for the line break missing is that this
information is contained in the `File` node, which is returned by
`recast.parse`.
However, because we build a node collection from the `Program` node
instead of the `File` node, we are loosing this information.
Using the `File` node fixes the issue and doesn't seem to break any
existing functionality.
fkling added a commit that referenced this pull request Jul 31, 2015
@fkling fkling merged commit 04c4a9f into facebook:master Jul 31, 2015
euphocat pushed a commit to euphocat/jscodeshift that referenced this pull request Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants