mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
fixed bug in autodoc that caused the Jinja documentation to warn under some cases. Before auto* a newline is inserted now so that it's possible to better mix different directives and directives that return new rst code.
This commit is contained in:
@@ -126,6 +126,11 @@ def generate_rst(what, name, members, inherited, undoc, add_content, document,
|
||||
result = ViewList()
|
||||
docstrings = []
|
||||
|
||||
# make sure that the view list starts with an empty line. This is
|
||||
# necessary for some situations where another directive preprocesses
|
||||
# rst and no starting newline is present
|
||||
result.append('', '')
|
||||
|
||||
if mod is None:
|
||||
warnings.append(document.reporter.warning(
|
||||
'don\'t know which module to import for autodocumenting %r '
|
||||
|
||||
Reference in New Issue
Block a user