mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2479: sphinx.ext.viewcode
uses python2 highlighter by default
This commit is contained in:
parent
1e979091f2
commit
04723c1175
1
CHANGES
1
CHANGES
@ -28,6 +28,7 @@ Bugs fixed
|
||||
* #2679: ``float`` package needed for ``'figure_align': 'H'`` latex option
|
||||
* #2671: image directive may lead to inconsistent spacing in pdf
|
||||
* #2705: `toctree` generates empty bullet_list if ``:titlesonly:`` specified
|
||||
* #2479: `sphinx.ext.viewcode` uses python2 highlighter by default
|
||||
|
||||
|
||||
Release 1.4.4 (released Jun 12, 2016)
|
||||
|
@ -139,8 +139,8 @@ def collect_pages(app):
|
||||
# construct a page name for the highlighted source
|
||||
pagename = '_modules/' + modname.replace('.', '/')
|
||||
# highlight the source using the builder's highlighter
|
||||
if env.config.highlight_language == 'python3':
|
||||
lexer = 'python3'
|
||||
if env.config.highlight_language in ('python3', 'default'):
|
||||
lexer = env.config.highlight_language
|
||||
else:
|
||||
lexer = 'python'
|
||||
highlighted = highlighter.highlight_block(code, lexer, linenos=False)
|
||||
|
Loading…
Reference in New Issue
Block a user