Skip to content

Commit 74fcec2

Browse files
authored
Force POSIX '\n' line endings in output on all platforms (#109)
Fixes #108.
1 parent ef0b347 commit 74fcec2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vimdoc/output.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def Filename(self):
2525

2626
def Write(self):
2727
filename = os.path.join(self.docdir, self.Filename())
28-
with io.open(filename, 'w', encoding='utf-8') as self.file:
28+
# Output POSIX line endings for portable output that can be published.
29+
# They are displayed properly in vim on all platforms.
30+
with io.open(filename, 'w', encoding='utf-8', newline='\n') as self.file:
2931
self.WriteHeader()
3032
self.WriteTableOfContents()
3133
for chunk in self.module.Chunks():

0 commit comments

Comments
 (0)