summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-31 09:24:29 -0400
committerTim Graham <timograham@gmail.com>2013-07-31 10:14:38 -0400
commit8af0b1afd2ab0c22497baaae03a5495da9af230d (patch)
treecdef3e19fd53b6ef3c43ef45b03ead0a39ec89c2 /docs
parented6ec47ff72f5597d53f8c3e3ccd9ba13c360d4e (diff)
[1.4.x] Added a bugfix in docutils 0.11 -- docs will now build properly.
Backport of a3a59a3197 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/_ext/djangodocs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index 3cf00a38e1..37f5e20a64 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -105,9 +105,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('</table>\n')
+
# <big>? Really?
def visit_desc_parameterlist(self, node):
self.body.append('(')