From 94607aa9cdc4a853710ea48544aa5f99bfdc017a Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 27 Mar 2019 15:00:13 +0000 Subject: [PATCH] TOC macros: Remove redundant recursion protection As discussed in #3881, it isn't really needed when user interaction is required to open child nodes. --- core/wiki/macros/toc.tid | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index e3ab6602a..a09ea0018 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -32,7 +32,7 @@ tags: $:/tags/Macro <$macrocall $name="toc-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> /> \end -\define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) +\define toc-linked-expandable-body(tag,sort:"",itemClassFilter,path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected"> @@ -51,14 +51,14 @@ tags: $:/tags/Macro <> <$reveal type="match" stateTitle=<> text="open"> - <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/> + <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path=<<__path__>>/> \end -\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) +\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected"> @@ -76,7 +76,7 @@ tags: $:/tags/Macro <$reveal type="match" stateTitle=<> text="open"> - <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/> + <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path=<<__path__>>/> @@ -84,22 +84,22 @@ tags: $:/tags/Macro \end \define toc-expandable-empty-message() -<$macrocall $name="toc-linked-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/> +<$macrocall $name="toc-linked-expandable-body" tag=<> sort=<> itemClassFilter=<> path=<>/> \end -\define toc-expandable(tag,sort:"",itemClassFilter:" ",exclude,path) -<$vars tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> excluded="""[enlist<__exclude__>] -[<__tag__>]""" path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}> +\define toc-expandable(tag,sort:"",itemClassFilter:" ",path) +<$vars tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}>
    - <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]"""> + <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>]"""> <$list filter="[all[current]toc-link[no]]" emptyMessage=<> > - <$macrocall $name="toc-unlinked-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter="""itemClassFilter""" exclude=<> path=<> /> + <$macrocall $name="toc-unlinked-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter="""itemClassFilter""" path=<> />
\end -\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) +\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected" >
  • >> @@ -119,14 +119,14 @@ tags: $:/tags/Macro <> <$reveal type="match" stateTitle=<> text="open"> - <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/> + <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path=<<__path__>>/>
  • \end -\define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) +\define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> @@ -145,7 +145,7 @@ tags: $:/tags/Macro <$reveal type="match" stateTitle=<> text="open"> - <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/> + <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path=<<__path__>>/>
  • @@ -153,15 +153,15 @@ tags: $:/tags/Macro \end \define toc-selective-expandable-empty-message() -<$macrocall $name="toc-linked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/> +<$macrocall $name="toc-linked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> path=<>/> \end -\define toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path) -<$vars tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> excluded="""[enlist<__exclude__>] -[<__tag__>]""" path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}> +\define toc-selective-expandable(tag,sort:"",itemClassFilter,path) +<$vars tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}>
      - <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]"""> + <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>]"""> <$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<> > - <$macrocall $name="toc-unlinked-selective-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<> path=<>/> + <$macrocall $name="toc-unlinked-selective-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path=<>/>