Tiddlers starting with '+' or '-' might as well be illegal.

49 views
Skip to first unread message

Flibbles

unread,
Jul 9, 2019, 2:03:27 AM7/9/19
to tiddl...@googlegroups.com
I'm writing plugins, and for a while, I was working under the assumption that lists are just a subset of filters, which is super convenient in many cases.

tiddlerA tidderB [[tiddler with spaces]]

can be interpreted as either.

However, it's not actually true. If you have a tiddler that starts with a '+' or a '-'. It breaks down.

tiddlerA -tiddler-with-dashes

produces different results. You have to have:

tiddlerA [[-tiddler-with-dashes]]

and I guess that's fine, but it looks like this case has never been considered.

Either

$tw.utils.stringifyList needs to properly wrap such tiddlers in brackets, which it currently doesn't, OR tiddlers starting with '+' or '-' need to be prohibited. I'm actually leaning toward prohibiting it, because otherwise this can cause confusion for users who want to do something like have "--Homepage--" be their Default tiddler, but when they put that in the setting, it doesn't work, because the instructions don't mention that dashes would need to be wrapped. Tiddlywiki already prohibits brackets. Why not this too?

-Flibbles

TonyM

unread,
Jul 9, 2019, 3:33:31 AM7/9/19
to TiddlyWiki
See this documentation for the use of + - ~ tiddler name, perhaps this is where this is coming from


Tony

Flibbles

unread,
Jul 9, 2019, 3:37:12 AM7/9/19
to TiddlyWiki
Right. That's correct. That's why they're not equivalent. Filter syntax has special use cases for when filter runs start with + - ~, but lists don't care about that. A word starting with + - ~ in a list is just interpreted as part of the tiddler title. I think the list parser should treat them as special cases, just as the filter parser does.

TonyM

unread,
Jul 9, 2019, 3:45:30 AM7/9/19
to TiddlyWiki
Fibbles

I think as a rule we try and keep the available characters we can use in tittles as broad as possible.

Any way, I will leave it to the developers to comment.

Regards
Tony

Flibbles

unread,
Jul 9, 2019, 3:48:24 AM7/9/19
to TiddlyWiki
That's understandable. Another solution would be requiring tiddlers starting with + - ~ to be wrapped in brackets in stringified lists.

Illegal: tiddlerA [[tiddler with spaces]] --My-Dashboard--
Legal: tiddlerA [[tiddler with spaces]] [[--My-Dashboard--]]

TonyM

unread,
Jul 9, 2019, 3:57:40 AM7/9/19
to TiddlyWiki
That is a good practice because even [[My Dashboard]] needs delimiting.

Regards
Tony

Flibbles

unread,
Jul 9, 2019, 4:02:44 AM7/9/19
to TiddlyWiki
I agree.

To summarize the crux of my argument:

PMario

unread,
Jul 9, 2019, 4:10:25 AM7/9/19
to TiddlyWiki
Hi,

I think your points are all valid. You should raise an issue at github.

-m
Reply all
Reply to author
Forward
0 new messages