summaryrefslogtreecommitdiff
path: root/sphinx/transforms/post_transforms/code.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-02-04 01:50:16 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-02-04 01:50:44 +0900
commit6ca669295c2692caef2838eb78e15e6f0faf4c34 (patch)
tree86d8dc375b48de29c8dc612e1f5a4839ebbcc553 /sphinx/transforms/post_transforms/code.py
parent6fd191d52ebe1a8940934875d5e884e6c93c7522 (diff)
downloadsphinx-git-6ca669295c2692caef2838eb78e15e6f0faf4c34.tar.gz
Close #1851: Allow to omit an argument for code-block directive
Diffstat (limited to 'sphinx/transforms/post_transforms/code.py')
-rw-r--r--sphinx/transforms/post_transforms/code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/transforms/post_transforms/code.py b/sphinx/transforms/post_transforms/code.py
index c873dd5bc..fb8533e9c 100644
--- a/sphinx/transforms/post_transforms/code.py
+++ b/sphinx/transforms/post_transforms/code.py
@@ -89,7 +89,7 @@ class HighlightLanguageVisitor(nodes.NodeVisitor):
if 'language' not in node:
node['language'] = setting.language
node['force_highlighting'] = False
- else:
+ elif 'force_highlighting' not in node:
node['force_highlighting'] = True
if 'linenos' not in node:
lines = node.astext().count('\n')