Skip to content

Force POSIX '\n' line endings in output on all platforms #109

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 2 commits into from
Mar 27, 2019
Merged

Conversation

dbarnett
Copy link
Contributor

Fixes #108.

@@ -25,7 +25,7 @@ def Filename(self):

def Write(self):
filename = os.path.join(self.docdir, self.Filename())
with io.open(filename, 'w', encoding='utf-8') as self.file:
with io.open(filename, 'w', encoding='utf-8', newline='\n') as self.file:
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth a comment here as to why we're not using the platform-default newline.

Copy link

Choose a reason for hiding this comment

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

because people may use vimdoc in both window and linux os for same project, if the generation txt file are different, it will cause diff patch when using git.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Can you check my wording is clear?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, lgtm. (Probably anything that calls out that we're doing this deliberately is fine.)

Copy link
Member

@malcolmr malcolmr left a comment

Choose a reason for hiding this comment

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

LGTM

@dbarnett dbarnett merged commit 74fcec2 into master Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants