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:
Armin Ronacher
2008-05-25 16:03:19 +00:00
parent 1aafa92e24
commit c784212031
+5
View File
@@ -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 '