diff options
author | Georg Brandl <georg@python.org> | 2009-02-14 23:14:33 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-02-14 23:14:33 +0100 |
commit | 4e9d0f4f4b796f9cbd96609e67ea4b7670b8300b (patch) | |
tree | 8321e4d0db31bea64b846c4eb5649b515af97b2e /sphinx/ext/autodoc.py | |
parent | 66609e8165011dc9b9879d49de0b71f3d9447686 (diff) | |
download | sphinx-git-4e9d0f4f4b796f9cbd96609e67ea4b7670b8300b.tar.gz |
Make it more probable for docutils to report the correct source
for content generated by autodoc.
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index aecf343cc..0cb2b14b1 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -652,9 +652,12 @@ def _auto_directive(dirname, arguments, options, content, lineno, state.memo.reporter = AutodocReporter(generator.result, state.memo.reporter) if dirname == 'automodule': node = nodes.section() + node.document = state.document # necessary so that the child nodes + # get the right source/line set nested_parse_with_titles(state, generator.result, node) else: node = nodes.paragraph() + node.document = state.document state.nested_parse(generator.result, 0, node) state.memo.reporter = old_reporter return generator.warnings + node.children |