1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

TOC Macros: fix recursion regression

Fixes #3881
This commit is contained in:
Jermolene 2019-03-27 14:59:38 +00:00
parent b1edcdb757
commit 62477c9fbb

View File

@ -12,14 +12,16 @@ tags: $:/tags/Macro
\define toc-body(tag,sort:"",itemClassFilter,exclude,path) \define toc-body(tag,sort:"",itemClassFilter,exclude,path)
<ol class="tc-toc"> <ol class="tc-toc">
<$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__>] -[enlist<__exclude__>]""">
<$vars item=<<currentTiddler>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}} excluded="""[enlist<__exclude__>] -[<__tag__>]"""> <$vars item=<<currentTiddler>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected"> <$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
<li class=<<toc-item-class>>> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>"> <li class=<<toc-item-class>>>
<<toc-caption>> <$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>">
</$list> <<toc-caption>>
<$macrocall $name="toc-body" tag=<<item>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<excluded>> path=<<path>>/> </$list>
</li> <$macrocall $name="toc-body" tag=<<item>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<excluded>> path=<<path>>/>
</li>
</$set>
</$set> </$set>
</$vars> </$vars>
</$list> </$list>