diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2015-03-30 20:34:00 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2015-03-31 11:32:01 +0900 |
commit | 0b60eafe0ec690c8844bc881810b2728b627a343 (patch) | |
tree | 233cb0ce3debf8dbfbb0ae5e4487d916d07d7ed1 /sphinx/highlighting.py | |
parent | 0215b1fb108ab3a78af41375c69eac84722022c1 (diff) | |
download | sphinx-git-0b60eafe0ec690c8844bc881810b2728b627a343.tar.gz |
Fix #1790 literalinclude strips empty lines at the head and tail
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r-- | sphinx/highlighting.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 57a841899..dd40bc308 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -35,12 +35,12 @@ from pygments.util import ClassNotFound from sphinx.pygments_styles import SphinxStyle, NoneStyle lexers = dict( - none = TextLexer(), - python = PythonLexer(), - pycon = PythonConsoleLexer(), - pycon3 = PythonConsoleLexer(python3=True), - rest = RstLexer(), - c = CLexer(), + none = TextLexer(stripnl=False), + python = PythonLexer(stripnl=False), + pycon = PythonConsoleLexer(stripnl=False), + pycon3 = PythonConsoleLexer(python3=True, stripnl=False), + rest = RstLexer(stripnl=False), + c = CLexer(stripnl=False), ) for _lexer in lexers.values(): _lexer.add_filter('raiseonerror') |