doc: Use AutodocReporter at example of nested_parse_with_titles()

In detail, please refer following thread:
https://groups.google.com/forum/#!topic/sphinx-dev/l4fHrIJfwq4
This commit is contained in:
Takeshi KOMIYA 2016-09-07 15:45:38 +09:00
parent 5a02c6162b
commit 3eb56b1c6f

View File

@ -125,6 +125,8 @@ Both APIs parse the content into a given node. They are used like this::
node = docutils.nodes.paragraph()
# either
from sphinx.ext.autodoc import AutodocReporter
self.state.memo.reporter = AutodocReporter(self.result, self.state.memo.reporter) # override reporter to avoid errors from "include" directive
nested_parse_with_titles(self.state, self.result, node)
# or
self.state.nested_parse(self.result, 0, node)