Skip to content

Commit

Permalink
Fix #2479: sphinx.ext.viewcode uses python2 highlighter by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Jun 24, 2016
1 parent 1e97909 commit 04723c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions sphinx/ext/viewcode.py
Expand Up @@ -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)
Expand Down

0 comments on commit 04723c1

Please sign in to comment.