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

Extra lines inserted #1432

Closed
nordsoyv opened this issue Apr 27, 2017 · 5 comments · Fixed by renovatebot/renovate#198
Closed

Extra lines inserted #1432

nordsoyv opened this issue Apr 27, 2017 · 5 comments · Fixed by renovatebot/renovate#198
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program

Comments

@nordsoyv
Copy link

If you have a file with a multiline template string, using windows line endings (CRLF) and the flow parser , extra empty lines are inserted in the output.

Example:
Input file with CRLF line endings

const aLongString = `
Line 1
Line 2
Line 3
Line 4
Line 5
`;

run prettier test.js --write --parser flow

Output

const aLongString = `

Line 1

Line 2

Line 3

Line 4

Line 5

`;
@bnjmnt4n
Copy link
Contributor

Seem to remember that this is an old issue. Could you try updating your version of prettier?

@nordsoyv
Copy link
Author

I'm on version 1.2.2 of prettier , 6.9.2 of node. Windows 10

@vjeux
Copy link
Contributor

vjeux commented Apr 27, 2017

Thanks, I can now reproduce! Working on a fix.

vjeux added a commit to vjeux/prettier that referenced this issue Apr 27, 2017
@vjeux vjeux added Assigned type:bug Issues identifying ugly output, or a defect in the program status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! and removed Assigned labels Apr 27, 2017
@vjeux
Copy link
Contributor

vjeux commented Apr 27, 2017

Was an easy fix :) #1439

@nordsoyv
Copy link
Author

Awesome :)

@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. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! 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