Skip to content

Commit

Permalink
fix trailing backslash stripped cause windows linesep (#1140)
Browse files Browse the repository at this point in the history
Fix trailing backslash stripped because of Windows line separator.

Closes #1139
  • Loading branch information
EeyoreLee authored Sep 22, 2023
1 parent d828a15 commit b8fd5a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yapf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def main(argv):

try:
reformatted_source, _ = yapf_api.FormatCode(
str('\n'.join(source) + '\n'),
str('\n'.join(source).replace('\r\n', '\n') + '\n'),
filename='<stdin>',
style_config=style_config,
lines=lines)
Expand Down

0 comments on commit b8fd5a4

Please sign in to comment.