mirror of
https://github.com/django/django.git
synced 2025-07-12 05:39:11 +00:00
[2.2.x] Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning on Sphinx 1.8+.
Backport of 89d41cba392b759732ba9f1db4ff29ed47da6a56 from master
This commit is contained in:
parent
f2f8e84939
commit
28dd5362ae
@ -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})
|
self.body.append('<section class="c-content-win" id="c-content-%(id)s-win">\n' % {'id': uid})
|
||||||
win_text = node['win_console_text']
|
win_text = node['win_console_text']
|
||||||
highlight_args = {'force': True}
|
highlight_args = {'force': True}
|
||||||
if 'linenos' in node:
|
linenos = node.get('linenos', False)
|
||||||
linenos = node['linenos']
|
|
||||||
else:
|
|
||||||
linenos = win_text.count('\n') >= self.highlightlinenothreshold - 1
|
|
||||||
|
|
||||||
def warner(msg):
|
def warner(msg):
|
||||||
self.builder.warn(msg, (self.builder.current_docname, node.line))
|
self.builder.warn(msg, (self.builder.current_docname, node.line))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user