at 23.05-pre 1.0 kB view raw
1diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py 2index ac2bd1b06..63ca52de2 100644 3--- a/sphinx/highlighting.py 4+++ b/sphinx/highlighting.py 5@@ -16,7 +16,7 @@ from pygments.filters import ErrorToken 6 from pygments.formatters import HtmlFormatter, LatexFormatter 7 from pygments.lexer import Lexer # NOQA 8 from pygments.lexers import get_lexer_by_name, guess_lexer 9-from pygments.lexers import PythonLexer, Python3Lexer, PythonConsoleLexer, \ 10+from pygments.lexers import Python2Lexer, Python3Lexer, PythonConsoleLexer, \ 11 CLexer, TextLexer, RstLexer 12 from pygments.styles import get_style_by_name 13 from pygments.util import ClassNotFound 14@@ -40,7 +40,7 @@ logger = logging.getLogger(__name__) 15 16 lexers = dict( 17 none = TextLexer(stripnl=False), 18- python = PythonLexer(stripnl=False), 19+ python = Python2Lexer(stripnl=False), 20 python3 = Python3Lexer(stripnl=False), 21 pycon = PythonConsoleLexer(stripnl=False), 22 pycon3 = PythonConsoleLexer(python3=True, stripnl=False),