Skip to content

Commit

Permalink
Force POSIX '\n' line endings in output on all platforms (#109)
Browse files Browse the repository at this point in the history
Fixes #108.
  • Loading branch information
dbarnett authored Mar 27, 2019
1 parent ef0b347 commit 74fcec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vimdoc/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ 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:
# Output POSIX line endings for portable output that can be published.
# They are displayed properly in vim on all platforms.
with io.open(filename, 'w', encoding='utf-8', newline='\n') as self.file:
self.WriteHeader()
self.WriteTableOfContents()
for chunk in self.module.Chunks():
Expand Down

0 comments on commit 74fcec2

Please sign in to comment.