diff options
author | Georg Brandl <georg@python.org> | 2009-01-26 22:41:22 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-26 22:41:22 +0100 |
commit | 611fcf7112b34ef4948ca9c51df8d2ef9a4c662c (patch) | |
tree | 7c2b76a3609d8db383492fc360c673c5a687c6c7 /sphinx/directives/code.py | |
parent | e65d9de023cf5b0e8033adec7b4cb71c101292b0 (diff) | |
download | sphinx-git-611fcf7112b34ef4948ca9c51df8d2ef9a4c662c.tar.gz |
Open literalinclude files in universal newline mode to allow
arbitrary newline conventions.
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index 5a438886a..8ce2eed91 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -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): |