summaryrefslogtreecommitdiff
path: root/docs/_ext
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2019-11-25 10:33:34 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-25 10:35:42 +0100
commit28dd5362ae17a975c4d273d6019aeb8e890e3576 (patch)
treea1a7e24177ad6a5291fc711a166c3f32c91c728f /docs/_ext
parentf2f8e84939a2987aa82c6ddd9351b2575cde184b (diff)
[2.2.x] Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning on Sphinx 1.8+.
Backport of 89d41cba392b759732ba9f1db4ff29ed47da6a56 from master
Diffstat (limited to 'docs/_ext')
-rw-r--r--docs/_ext/djangodocs.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index d33d48a1eb..95ae530680 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -254,10 +254,7 @@ def visit_console_html(self, node):
self.body.append('<section class="c-content-win" id="c-content-%(id)s-win">\n' % {'id': uid})
win_text = node['win_console_text']
highlight_args = {'force': True}
- if 'linenos' in node:
- linenos = node['linenos']
- else:
- linenos = win_text.count('\n') >= self.highlightlinenothreshold - 1
+ linenos = node.get('linenos', False)
def warner(msg):
self.builder.warn(msg, (self.builder.current_docname, node.line))