diff --git a/plugins/tiddlywiki/text-slicer/docs.tid b/plugins/tiddlywiki/text-slicer/docs.tid index 5b09e99dd..a31210602 100644 --- a/plugins/tiddlywiki/text-slicer/docs.tid +++ b/plugins/tiddlywiki/text-slicer/docs.tid @@ -132,8 +132,8 @@ The tiddler representing the list itself has the following fields: * ''toc-type'': the text "list" * ''toc-list-type'': the text "ul" or "ol" +* ''toc-list-filter'': the default filter used to generate the titles of the list items * ''title'': an automatically generated unique title -* ''text'': the default filter used to generate the titles of the list items * ''list'': ordered list of titles of tiddlers representing the items in this list * ''tags'': tagged with the title of the parent heading ** In addition, any CSS classes found in the HTML are converted into tags diff --git a/plugins/tiddlywiki/text-slicer/exporters/full-doc.tid b/plugins/tiddlywiki/text-slicer/exporters/full-doc.tid index 7517120cf..2a5b3c430 100644 --- a/plugins/tiddlywiki/text-slicer/exporters/full-doc.tid +++ b/plugins/tiddlywiki/text-slicer/exporters/full-doc.tid @@ -1,3 +1,3 @@ title: $:/plugins/tiddlywiki/text-slicer/exporters/full-doc -{{||$:/plugins/tiddlywiki/text-slicer/templates/static/document}} +{{||$:/plugins/tiddlywiki/text-slicer/templates/static/document}} \ No newline at end of file diff --git a/plugins/tiddlywiki/text-slicer/modules/slicer.js b/plugins/tiddlywiki/text-slicer/modules/slicer.js index 70045f3a2..3a41159e6 100644 --- a/plugins/tiddlywiki/text-slicer/modules/slicer.js +++ b/plugins/tiddlywiki/text-slicer/modules/slicer.js @@ -175,8 +175,9 @@ Slicer.prototype.processNode = function(domNode) { this.parentStack.push({type: tagName, title: this.addTiddler({ "toc-type": "list", "toc-list-type": tagName, + "toc-list-filter": "[tag!has[draft.of]]", + text: "", title: title, - text: "[tag!has[draft.of]]", list: [], tags: tags })}); diff --git a/plugins/tiddlywiki/text-slicer/templates/interactive/document.tid b/plugins/tiddlywiki/text-slicer/templates/interactive/document.tid index a8b903cd4..ab3c75169 100644 --- a/plugins/tiddlywiki/text-slicer/templates/interactive/document.tid +++ b/plugins/tiddlywiki/text-slicer/templates/interactive/document.tid @@ -23,7 +23,7 @@ $:/config/plugins/tiddlywiki/text-slicer/heading-status/$(currentTiddler)$ <$set name="tv-exclude-filter" value={{!!toc-exclude-filter}}> -<$list filter="[list!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler" listItem="item"/> +<$list filter="[list!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler"/> diff --git a/plugins/tiddlywiki/text-slicer/templates/interactive/heading.tid b/plugins/tiddlywiki/text-slicer/templates/interactive/heading.tid index fd8241be8..5dc681314 100644 --- a/plugins/tiddlywiki/text-slicer/templates/interactive/heading.tid +++ b/plugins/tiddlywiki/text-slicer/templates/interactive/heading.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/interactive/heading \define config-heading-status() -$(tv-heading-status-config-title)$/$(currentTiddler)$ +$(tv-heading-status-config-title)$/$(tv-heading-status-config-prefix)$/$(currentTiddler)$ \end \define body(level:"h1") @@ -23,7 +23,7 @@ $(tv-heading-status-config-title)$/$(currentTiddler)$ <$view field="text"/> <$reveal type="nomatch" state=<> text="open" default=<>> -<$list filter="[tag!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler" listItem="item"/> +<$list filter="[tag!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler"/> diff --git a/plugins/tiddlywiki/text-slicer/templates/interactive/list.tid b/plugins/tiddlywiki/text-slicer/templates/interactive/list.tid index fd44bb548..8e370b2d7 100644 --- a/plugins/tiddlywiki/text-slicer/templates/interactive/list.tid +++ b/plugins/tiddlywiki/text-slicer/templates/interactive/list.tid @@ -1,3 +1,11 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/interactive/list -{{||$:/plugins/tiddlywiki/text-slicer/templates/static/list}} +\define body(type:"ul") +<$type$> +<$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> +<$list filter={{!!toc-list-filter}} template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler"/> + + +\end + +<$macrocall $name="body" type={{!!toc-list-type}}/> diff --git a/plugins/tiddlywiki/text-slicer/templates/interactive/paragraph.tid b/plugins/tiddlywiki/text-slicer/templates/interactive/paragraph.tid index 9438dd421..177ee67e7 100644 --- a/plugins/tiddlywiki/text-slicer/templates/interactive/paragraph.tid +++ b/plugins/tiddlywiki/text-slicer/templates/interactive/paragraph.tid @@ -3,7 +3,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/interactive/paragraph \define body() <$link tag="div" class="tc-document-tiddler-link"> -<$list filter="""[all[current]] $(tv-exclude-filter)$""" listItem="item"> +<$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> <$transclude/> diff --git a/plugins/tiddlywiki/text-slicer/templates/static/document.tid b/plugins/tiddlywiki/text-slicer/templates/static/document.tid index 1de2edfda..1d1afd2c8 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/document.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/document.tid @@ -2,6 +2,6 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/document <$set name="tv-exclude-filter" value={{!!toc-exclude-filter}}> -<$list filter="[list!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler" listItem="item"/> +<$list filter="[list!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> diff --git a/plugins/tiddlywiki/text-slicer/templates/static/heading.tid b/plugins/tiddlywiki/text-slicer/templates/static/heading.tid index 18ab5592f..6616b549a 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/heading.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/heading.tid @@ -4,7 +4,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/heading <$level$> <$view field="text"/> -<$list filter="[tag!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler" listItem="item"/> +<$list filter="[tag!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> \end <$macrocall $name="body" level={{!!toc-heading-level}}/> diff --git a/plugins/tiddlywiki/text-slicer/templates/static/list.tid b/plugins/tiddlywiki/text-slicer/templates/static/list.tid index 0dbaf22e3..493288992 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/list.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/list.tid @@ -2,8 +2,8 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/list \define body(type:"ul") <$type$> -<$list filter="""[all[current]] $(tv-exclude-filter)$""" listItem="item"> -<$list filter={{!!text}} template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler" listItem="item"/> +<$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> +<$list filter={{!!toc-list-filter}} template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> \end diff --git a/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid b/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid index ab6e54e56..d7c56372f 100644 --- a/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid +++ b/plugins/tiddlywiki/text-slicer/templates/static/paragraph.tid @@ -3,7 +3,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/paragraph \define body()