mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 00:42:11 -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:
1 parent
1aafa92e24
commit
c784212031
1 file changed
+5
@@ -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