Cleaner fix for double trailing whitespace apidoc

This commit is contained in:
AleksaC 2020-07-11 12:32:37 +02:00
parent 72abb19740
commit 73bbe90ee0
2 changed files with 3 additions and 5 deletions

View File

@ -35,16 +35,15 @@ Submodules
----------
{% if separatemodules %}
{{ toctree(submodules) }}
{% endif %}
{%- if not separatemodules %}
{% else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- [submodule, "module"] | join(" ") | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
{%- endif -%}
{% endif %}
{%- endif %}
{%- endif %}
{%- if not modulefirst and not is_namespace %}
Module contents

View File

@ -121,7 +121,6 @@ def test_pep_0420_enabled_separate(make_app, apidoc):
with open(outdir / 'a.b.c.rst') as f:
rst = f.read()
assert ".. toctree::\n :maxdepth: 4\n\n a.b.c.d\n" in rst
with open(outdir / 'a.b.e.rst') as f: