aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQrius <[email protected]>2025-04-24 08:50:45 +0200
committerQrius <[email protected]>2025-04-24 08:50:47 +0200
commitfc9564127cc13ff435789fa2dde3a526367234f3 (patch)
tree086ca5176e3ea370c8267c5be0601965724049c8 /src
parent34f0cf570febcc83df8aa3fde314267fbbc277e1 (diff)
downloadskaldpress-fc9564127cc13ff435789fa2dde3a526367234f3.tar.gz
skaldpress-fc9564127cc13ff435789fa2dde3a526367234f3.zip
Fix incorrect popping from template stack
Diffstat (limited to 'src')
-rw-r--r--src/smp/builtins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smp/builtins.py b/src/smp/builtins.py
index d5eb4a5..537da37 100644
--- a/src/smp/builtins.py
+++ b/src/smp/builtins.py
@@ -185,7 +185,8 @@ def _smp_builtin_template_content():
def inner(macro_processor):
filename, content, extension = macro_processor._get_macro_with_prefix(
"template_stack_content"
- )[0]
+ ).pop()
+
macro_processor._enter_file_frame(f"[part]{filename}", 0, "")
res = macro_processor.process_input(content, file=filename)
@@ -193,7 +194,6 @@ def _smp_builtin_template_content():
res = smp_builtin_html_from_markdown(macro_processor, res)
macro_processor._pop_file_frame()
- macro_processor._get_macro_with_prefix("template_stack_content").pop(0)
return res
return inner