Skip to content

Commit

Permalink
Fix sphinx-doc#4137: doctest: doctest block is always highlighted as …
Browse files Browse the repository at this point in the history
…python console (pycon)
  • Loading branch information
tk0miya committed Oct 12, 2017
1 parent 87e39a5 commit 3dd58e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -36,6 +36,7 @@ Features added
* #3972: epub: Sort manifest entries by filename
* #4052: viewcode: Sort before highlighting module code
* #1448: qthelp: Add new config value; :confval:`qthelp_namespace`
* #4137: doctest: doctest block is always highlighted as python console (pycon)


Features removed
Expand Down
2 changes: 2 additions & 0 deletions sphinx/ext/doctest.py
Expand Up @@ -123,6 +123,8 @@ def run(self):
if self.name == 'testoutput':
# don't try to highlight output
node['language'] = 'none'
else:
node['language'] = 'pycon'
node['options'] = {}
if self.name in ('doctest', 'testoutput') and 'options' in self.options:
# parse doctest-like output comparison flags
Expand Down

0 comments on commit 3dd58e6

Please sign in to comment.