summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-01-24 08:52:43 -0500
committerTim Graham <timograham@gmail.com>2014-01-24 09:05:59 -0500
commit85057522bc220585363e637528d970d3802475e8 (patch)
tree891eb1fe28f0c93753ca7c98f67683b0706007d0
parent03d9b9ea0af403bf27ce552b9f8262b47bfdff0e (diff)
[1.4.x] Fixed #21869 -- Fixed docs building with Sphinx 1.2.1.
Thanks tragiclifestories for the report. Backport of e1d18b9d2e from master
-rw-r--r--docs/_ext/djangodocs.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index 37f5e20a64..3398017471 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -114,11 +114,13 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
self.compact_p = self.context.pop()
self.body.append('</table>\n')
- # <big>? Really?
def visit_desc_parameterlist(self, node):
- self.body.append('(')
+ self.body.append('(') # by default sphinx puts <big> around the "("
self.first_param = 1
+ self.optional_param_level = 0
self.param_separator = node.child_text_separator
+ self.required_params_left = sum([isinstance(c, addnodes.desc_parameter)
+ for c in node.children])
def depart_desc_parameterlist(self, node):
self.body.append(')')