diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2019-11-25 10:33:34 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-25 10:34:21 +0100 |
| commit | 641deb4d50e2ae3c7031739dcf9d1524492dc095 (patch) | |
| tree | 4ccbede66032a4b92b74cce22350773829826205 /docs/_ext | |
| parent | c332f89dc6b57638adce2398f769b525eb370fc0 (diff) | |
[3.0.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.py | 5 |
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)) |
