From 296743632dff97931edc2e2cf48935a91663d113 Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 7 Feb 2024 14:32:22 +0100 Subject: [PATCH] improve inline docs --- core/wiki/macros/toc.tid | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index f54d7d2e1..cbf81223d 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -1,6 +1,14 @@ title: $:/core/macros/toc tags: $:/tags/Macro + + \whitespace trim \procedure toc-defaultItemTemplate() @@ -15,9 +23,10 @@ tags: $:/tags/Macro \end - + \function tf.toc-getItemTemplate() [!is[blank]then] :else[get[toc-itemTemplate]] + \procedure _itemTemplate() <$transclude $tiddler=<> > <> @@ -40,17 +49,17 @@ tags: $:/tags/Macro \function tf.toc-itemClass() [] [] [] [] +[join[ ]] + \function tf.toc-getHideText() [get] \function tf.toc-hideIsYes() [format:titlelist[]] - \function tf.toc-hide() [match[yes]then] :else[] - -\function tf.toc-include() [get] -\function tf.toc-filter() [get] + +\function tf.toc-include() [get] +\function tf.toc-filter() [get] - + \procedure toc-filterDefault() [all[shadows+tiddlers]tag!has[draft.of]] \procedure toc-filterParent() [has!has[draft.of]] :filter[getmatch] \procedure toc-filterTagLike() [getenlist-input[]] @@ -61,17 +70,17 @@ tags: $:/tags/Macro \function tf.toc-newPath() [addsuffix[/]addsuffix] - + \procedure toc-body(tag,sort:"",itemClassFilter,exclude,path) <$set name=currentTiddler filter="[!is[blank]thenelse]">
    - + <$list filter=` [subfilter] :else[subfilter$(sort)$] [subfilter] -[] -[subfilter]`> <%if [] -[subfilter] %> - <$let item=<> _path=<> > + <$let _path=<> > <$set name="_excluded" filter="[subfilter] [] [subfilter]">
  1. >> @@ -84,8 +93,8 @@ tags: $:/tags/Macro <% endif %> - - <$macrocall $name="toc-body" tag=<> exclude=<<_excluded>> path=<<_path>> + + <$macrocall $name="toc-body" tag=<> exclude=<<_excluded>> path=<<_path>> />
  2. @@ -100,7 +109,7 @@ tags: $:/tags/Macro @@ -109,7 +118,7 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter \end