When to wrap a filter with quotes

To list my tiddlers tagged with 1 highlight, I used

<$list filter="[tag[1 highlight]]" />

I had to surround the filter with quotes to make it work.

But then when using custom file paths, I noticed that this works fine.

[tag[1 highlight]addprefix[journals/]]

Notice there are no quotes to handle the space in the tag, although it too is a filter.

Question is when do I need quotes to handle a tag or string with spaces inside filters?

Filters themselves have no requirements for quotes. When you use filters as attributes for widgets, you should wrap them in quotes to mark the start and end of the attribute.

4 Likes