Skip to content
Snippets Groups Projects
Commit 1d6ce2eb authored by Eliott Sammier's avatar Eliott Sammier
Browse files

Template st:module now better supports unbound variables

parent 1c69742d
No related branches found
No related tags found
1 merge request!1Main
......@@ -9,8 +9,7 @@ template mt:module(?mod) {
format {
"""+++
title = "%s"
weight = %s0
bookCollapseSection = true
%sbookCollapseSection = true
+++
# %1$s
......@@ -21,7 +20,7 @@ bookCollapseSection = true
# (not explicitly documented but confirmed from testing), including
# "%1$" position specifiers, which allows reusing the 1st param by index
?title
?weight
coalesce(st:format("weight = %s\n", ?weight * 10), "")
} st:nl()
group {
......@@ -42,6 +41,8 @@ bookCollapseSection = true
# Module / section attributes
?mod :titre ?title .
optional {
?mod :index ?index .
bind(?index + 1 as ?weight)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment