mirror of
https://github.com/django/django.git
synced 2025-01-03 06:55:47 +00:00
Removed unnecessary workarounds for Sphinx < 4.3.0.
Unnecessary since ebf25555bb
.
This commit is contained in:
parent
fcfbf08abe
commit
60ac77f32e
@ -9,7 +9,6 @@ from docutils import nodes
|
||||
from docutils.parsers.rst import Directive
|
||||
from docutils.statemachine import ViewList
|
||||
from sphinx import addnodes
|
||||
from sphinx import version_info as sphinx_version
|
||||
from sphinx.builders.html import StandaloneHTMLBuilder
|
||||
from sphinx.directives.code import CodeBlock
|
||||
from sphinx.domains.std import Cmdoption
|
||||
@ -118,15 +117,11 @@ class DjangoHTMLTranslator(HTMLTranslator):
|
||||
self.context.append(self.compact_p)
|
||||
self.compact_p = True
|
||||
# Needed by Sphinx.
|
||||
if sphinx_version >= (4, 3):
|
||||
self._table_row_indices.append(0)
|
||||
else:
|
||||
self._table_row_index = 0
|
||||
self.body.append(self.starttag(node, "table", CLASS="docutils"))
|
||||
|
||||
def depart_table(self, node):
|
||||
self.compact_p = self.context.pop()
|
||||
if sphinx_version >= (4, 3):
|
||||
self._table_row_indices.pop()
|
||||
self.body.append("</table>\n")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user