TiddlyWiki5/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid

26 lines
1.1 KiB
Plaintext

created: 20211130114043280
from-version: 5.2.1
modified: 20230710073343947
rp-input: the filter output of all previous runs so far
rp-output: the input titles as modified by the filters returned by this filter run
rp-purpose: modify input titles by successively evaluating a list of filters and applying the first result
tags: [[Named Filter Run Prefix]]
title: Cascade Filter Run Prefix
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":cascade" | - )
[[run|"Filter Run"]]
"""/>
The [[filter expression|Filter Expression]] for this [[filter run|Filter Run]] is evaluated to return a list of filters. Each input title is then evaluated against each of the filters in turn, and the input title is replaced with the first result of the first filter that returns a non-empty list. If none of the filters return a result for an input title, it is replaced with an empty string.
The following variables are available within the filter run:
* <<.var currentTiddler>> - the input title
* <<.var ..currentTiddler>> - the value of the variable <<.var currentTiddler>> outside the filter run.
[[Cascade Filter Run Prefix (Examples)]]