diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py index 833232a0c3..e7e316f58b 100644 --- a/docs/_ext/djangodocs.py +++ b/docs/_ext/djangodocs.py @@ -92,9 +92,15 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): # Don't use border=1, which docutils does by default. def visit_table(self, node): + self.context.append(self.compact_p) + self.compact_p = True self._table_row_index = 0 # Needed by Sphinx self.body.append(self.starttag(node, 'table', CLASS='docutils')) + def depart_table(self, node): + self.compact_p = self.context.pop() + self.body.append('\n') + # ? Really? def visit_desc_parameterlist(self, node): self.body.append('(')