summaryrefslogtreecommitdiff
path: root/sphinx/ext/viewcode.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-25 21:36:30 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-25 21:36:30 +0100
commitf01d50d695bf55f1af34b87c4e6c84f76dd9a36d (patch)
treee98dc537312410d5661ae76c72306d3a8d2a8e49 /sphinx/ext/viewcode.py
parent7ad0fcf22dbff5ee80a644e46429ff2ec3f25980 (diff)
parenteb5b3aa25dbc918c8250a2336aaaf2b753ad36b5 (diff)
downloadsphinx-git-f01d50d695bf55f1af34b87c4e6c84f76dd9a36d.tar.gz
Merge branch '5.x'
# Conflicts: # CHANGES # doc/conf.py # sphinx/__init__.py # sphinx/builders/html/__init__.py # sphinx/domains/python.py # tests/test_build_html.py
Diffstat (limited to 'sphinx/ext/viewcode.py')
-rw-r--r--sphinx/ext/viewcode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py
index 279997b43..d61837945 100644
--- a/sphinx/ext/viewcode.py
+++ b/sphinx/ext/viewcode.py
@@ -244,7 +244,7 @@ def collect_pages(app: Sphinx) -> Generator[Tuple[str, Dict[str, Any], str], Non
# construct a page name for the highlighted source
pagename = posixpath.join(OUTPUT_DIRNAME, modname.replace('.', '/'))
# highlight the source using the builder's highlighter
- if env.config.highlight_language in ('python3', 'default', 'none'):
+ if env.config.highlight_language in {'default', 'none'}:
lexer = env.config.highlight_language
else:
lexer = 'python'