summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-01-24 08:52:43 -0500
committerTim Graham <timograham@gmail.com>2014-07-18 13:07:52 +0000
commit6726d750979a7c29e0dd866b4ea367eef7c8a420 (patch)
tree722588c4ed2fa5f08eef6eb40e48a789f2cc63b5
parente982cbd4a13a17e8c9246860fec8be8716519a66 (diff)
downloaddjango-stable/1.3.x.tar.gz
[1.3.x] Fixed #21869 -- Fixed docs building with Sphinx 1.2.1.stable/1.3.x
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 003e4ab588..825ea931e9 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -136,11 +136,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(')')