Skip to content

Insert a line break before a function at EOF if needed #19141

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

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

amcasey
Copy link
Member

@amcasey amcasey commented Oct 12, 2017

This is a pre-existing issue that became more obvious after refining trivia handling.

This is a pre-existing issue that became more obvious after refining
trivia handling.
@amcasey amcasey requested a review from RyanCavanaugh October 12, 2017 21:20
@@ -785,7 +785,10 @@ namespace ts.refactor.extractSymbol {
changeTracker.insertNodeBefore(context.file, nodeToInsertBefore, newFunction, { suffix: context.newLineCharacter + context.newLineCharacter });
}
else {
changeTracker.insertNodeBefore(context.file, scope.getLastToken(), newFunction, { prefix: context.newLineCharacter, suffix: context.newLineCharacter });
changeTracker.insertNodeBefore(context.file, scope.getLastToken(), newFunction, {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the actual change. Each other diff just shows a single new linebreak.

@amcasey amcasey merged commit d940cda into microsoft:master Oct 12, 2017
@amcasey amcasey deleted the MissingNewlineAtEOF branch October 12, 2017 22:28
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant