Skip to content

Commit 37f32bb

Browse files
committed
fix: Deal with empty {{ content }}
1 parent df0c27d commit 37f32bb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/sphinxnotes/project/templates/autoconfval.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
{{ line }}
1919
{% endfor %}
2020

21-
{% for line in content.split('\n') -%}
21+
{% for line in (content or '').split('\n') -%}
2222
{{ line }}
2323
{% endfor %}

src/sphinxnotes/project/templates/autoobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ Cross-reference roles for referencing a ``{{ dispname }}`` object:
3434
{% endif %}
3535
{% endfor %}
3636

37-
{% for line in content.split('\n') -%}
37+
{% for line in (content or '').split('\n') -%}
3838
{{ line }}
3939
{% endfor %}

0 commit comments

Comments
 (0)