1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Help beginners orient to empty filter parameters (#8353)

This commit is contained in:
springerspandrel 2024-07-09 05:40:14 -04:00 committed by GitHub
parent 703edd154c
commit 5aa889859a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,18 @@
created: 20240708171243370
modified: 20240708201827711
tags:
title: Operators without parameters
Many [[Filter Operators]] have no [[parameter|Filter Parameter]] available. Still, each operator must be followed by a bracketed parameter expression — even if it is empty — as with the <<.olink backlinks>> operator below:
`[<currentTiddler>backlinks[]]`
(Even though an expression such as `[<currentTiddler>backlinks]` may at first <<.em seem>> well-formed — insofar as closing brackets seem to pair properly with opening brackets — each operator needs its own parameter brackets, even if empty. See [[Filter Syntax]].)
The following [[Filter Operators]] accept no parameters:
<div>
<<list-links filter:"[op-parameter[none]] [tag[Filter Operators]!has[op-parameter]] -[search:op-purpose[same]]" class:"multi-columns">>
</div>

View File

@ -1,5 +1,5 @@
created: 20150220152540000
modified: 20230710074423650
modified: 20240708202234843
tags: [[Filter Step]]
title: Filter Parameter
type: text/vnd.tiddlywiki
@ -29,6 +29,8 @@ The parameter to a [[filter operator|Filter Operators]] can be:
:: The parameter is the current value of the [[variable|Variables]] whose name appears between the angle brackets. Macro parameters are <<.em not>> supported up to v5.2.0
::<<.from-version "5.2.0">> Literal macro parameters are supported. For example: `[<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>]`.
<<.note """Every [[filter Operator]] must be followed by a parameter expression. In the case of [[Operators without parameters]], that expression is empty, as with the filter Operator <<.olink links>> in `[<currentTiddler>links[]]`.""">>
---
<<.from-version "5.1.23">> [[Filter Step]]s support multiple parameters which are separated by a `,` character.