Commits

Matt McClure  committed 6c2cc24

Allow headings in doc strings via a quick hack

  • Participants
  • Parent commits ef3092d

Comments (0)

Files changed (2)

File sphinx/directives/__init__.py

             # needed for association of version{added,changed} directives
             self.env.temp_data['object'] = self.names[0]
         self.before_content()
-        self.state.nested_parse(self.content, self.content_offset, contentnode)
+        from sphinx.util import nodes
+        nodes.nested_parse_with_titles(self.state, self.content, contentnode)
         DocFieldTransformer(self).transform_all(contentnode)
         self.env.temp_data['object'] = None
         self.after_content()

File sphinx/ext/autodoc.py

     #: order if autodoc_member_order is set to 'groupwise'
     member_order = 0
     #: true if the generated content may contain titles
-    titles_allowed = False
+    titles_allowed = True
 
     option_spec = {'noindex': bool_option}
 
         self.state.memo.reporter = AutodocReporter(self.result,
                                                    self.state.memo.reporter)
 
-        if documenter.titles_allowed:
+        if True: #documenter.titles_allowed:
             node = nodes.section()
             # necessary so that the child nodes get the right source/line set
             node.document = self.state.document