From 23c03e602d3676cbee42fd857132a67d9d5b4fac Mon Sep 17 00:00:00 2001 From: andjar <2013988+andjar@users.noreply.github.com> Date: Wed, 17 Apr 2024 22:30:16 +0200 Subject: [PATCH] Update tree.tid improve backwards compatibility --- core/wiki/macros/tree.tid | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/wiki/macros/tree.tid b/core/wiki/macros/tree.tid index f56d9d2ec..fd849a2a8 100644 --- a/core/wiki/macros/tree.tid +++ b/core/wiki/macros/tree.tid @@ -9,7 +9,7 @@ tags: $:/tags/Macro \end -\define branch-node(prefix,chunk,field,separator: "/") +\define branch-node(prefix,chunk,separator: "/",field: "title") \whitespace trim
  • <$set name="reveal-state" value={{{ [[$:/state/tree/]addsuffix<__prefix__>addsuffix<__chunk__>] }}}> @@ -26,13 +26,13 @@ tags: $:/tags/Macro (<$count filter="[all[shadows+tiddlers]get<__field__>removeprefix<__prefix__>removeprefix<__chunk__>] -[<__prefix__>addsuffix<__chunk__>]"/>) <$reveal type="match" stateTitle=<> text="show"> -<$macrocall $name="tree-node" prefix={{{ [<__prefix__>addsuffix<__chunk__>] }}} field=<<__field__>> separator=<<__separator__>>/> +<$macrocall $name="tree-node" prefix={{{ [<__prefix__>addsuffix<__chunk__>] }}} separator=<<__separator__>> field=<<__field__>>/>
  • \end -\define tree-node(prefix,field,separator: "/") +\define tree-node(prefix,separator: "/",field: "title") \whitespace trim
      <$list filter="[all[shadows+tiddlers]get<__field__>prefix<__prefix__>removeprefix<__prefix__>splitbefore<__separator__>sort[]!suffix<__separator__>]" variable="chunk"> @@ -41,17 +41,17 @@ tags: $:/tags/Macro <$list filter="[all[shadows+tiddlers]get<__field__>prefix<__prefix__>removeprefix<__prefix__>splitbefore<__separator__>sort[]suffix<__separator__>]" variable="chunk"> -<$macrocall $name="branch-node" prefix=<<__prefix__>> chunk=<> field=<<__field__>> separator=<<__separator__>>/> +<$macrocall $name="branch-node" prefix=<<__prefix__>> chunk=<> separator=<<__separator__>> field=<<__field__>>/>
    \end -\define tree(prefix: "$:/",field:"title",separator: "/") +\define tree(prefix: "$:/",separator: "/",field: "title") \whitespace trim
    <$text text=<<__prefix__>>/>
    -<$macrocall $name="tree-node" prefix=<<__prefix__>> field=<<__field__>> separator=<<__separator__>>/> +<$macrocall $name="tree-node" prefix=<<__prefix__>> separator=<<__separator__>> field=<<__field__>>/>
    \end