[Edit: Solution found, see end of post]
I have a tiddler with an empty field like so:
title: very-long-title
bar:
I also have a procedure to simplify the use of the very-long-title:
\procedure x() very-long-title
At a first glance the following filters should give the same output but…
[{very-long-title!!bar}!match[yes]then[correct]else[error]]
→ correct
[<x>get[bar]!match[yes]then[correct]else[error]]
→ error
The get
does not accept an empty field.
How can the second filter be made to behave like the former and accept that bar
-field is empty?
Thank you!
I think I got it! Use a function + its operator !
\function x-get(field) [very-long-title]get<field>
[function[x-get],[bar]!match[yes]then[correct]else[error]]
→ correct