about summary refs log tree commit diff stats
path: root/templates/macros.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/macros.html')
-rw-r--r--templates/macros.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/macros.html b/templates/macros.html
index 2ad23e6..571c6e0 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -1,12 +1,12 @@
-{% macro table_of_contents(toc, max_level) %}
+{%- macro table_of_contents(toc, max_level) %}
 <ul>
-  {% for header in toc %}
+  {%- for header in toc %}
     <li>
       <a href="{{ header.permalink | safe }}">{{ header.title }}</a>
-        {% if header.children and header.level < max_level %}
-          {{ self::table_of_contents(toc=header.children, max_level=max_level) }}
-        {% endif %}
+        {%- if header.children and header.level < max_level %}
+          {{- self::table_of_contents(toc=header.children, max_level=max_level) | indent() | safe() }}
+        {%- endif %}
     </li>
-  {% endfor %}
+  {%- endfor %}
 </ul>
-{% endmacro %}
+{%- endmacro %}