Add apply filter run prefix

The map filter run prefix is often used as a way to move a computed value in the input list into a variable so that it can be used as a parameter of a filter operator. The apply filter run prefix extends this idea to make the input list available as variables $1, $2 etc. Unlike the map prefix, the apply filter run is only evaluated once.
This commit is contained in:
Jeremy Ruston
2025-02-12 10:04:46 +00:00
parent 28935a5856
commit 611adadaed
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
title: Filters/FilterRunPrefixes/Applu
description: Applu filter run prefix
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$text text={{{ a b c :apply[<$1>addsuffix<$2>addsuffix<$3>] }}}/>
+
title: ExpectedResult
<p>abc</p>