10th July 2023 at 7:42am
purpose | replace any input to this filter run with its output, only evaluating the run when there is any input |
---|---|
input | all tiddler titles |
output | the output of this filter run replaces the output of previous runs unless it is an empty list (see below) |
The :then
filter run prefix is used to replace the result of all previous filter runs with its output.
If the result of all previous runs is an empty list, the :then
prefixed filter run is not evaluated.
If the output of a :then
prefixed filter run is itself an empty list, the result of all previous filter runs is passed through unaltered.
:then
run prefix versus the then
operator
The major difference between the then
operator and a :then
prefixed filter run is that the operator will replace each item of the input Title List with its parameter while :then
will replace the whole input list with the result of its run.
:then Filter Run Prefix | then Operator |
---|---|
[tag[WikiText]] :then[[true]] | [tag[WikiText]then[true]] To make them equivalent, additional filter steps may be added: [tag[WikiText]count[]compare:number:gt[0]then[true]] |