summaryrefslogtreecommitdiff
path: root/sphinx/highlighting.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2015-03-30 20:34:00 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2015-03-31 11:32:01 +0900
commit0b60eafe0ec690c8844bc881810b2728b627a343 (patch)
tree233cb0ce3debf8dbfbb0ae5e4487d916d07d7ed1 /sphinx/highlighting.py
parent0215b1fb108ab3a78af41375c69eac84722022c1 (diff)
downloadsphinx-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.py12
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')