Open literalinclude files in universal newline mode to allow

arbitrary newline conventions.
This commit is contained in:
Georg Brandl 2009-01-26 22:41:22 +01:00
parent e65d9de023
commit 611fcf7112
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
Release 0.5.2 (in development)
==============================
* Open literalinclude files in universal newline mode to allow
arbitrary newline conventions.
* Actually make the ``-Q`` option work.
* #86: Fix explicit document titles in toctrees.

View File

@ -70,7 +70,7 @@ def literalinclude_directive(name, arguments, options, content, lineno,
encoding = options.get('encoding', env.config.source_encoding)
try:
f = codecs.open(fn, 'r', encoding)
f = codecs.open(fn, 'rU', encoding)
text = f.read()
f.close()
except (IOError, OSError):