diff --git a/vimdoc/output.py b/vimdoc/output.py index e0e83db..6e2a267 100644 --- a/vimdoc/output.py +++ b/vimdoc/output.py @@ -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():