How do I make list-links prefix case insensitive?

I’m using the list-links/prefix functions to list all tiddlers whose titles start with a given letter, for instance <<list-links [prefix[A]]>> lists all tiddlers beginning with a capital “A” in alphabetical order but it’s case-sensitive by default. Can I make it case-insensitive so it displays all tiddlers starting with both lower case and upper case, for instance both “A” and “a”?

The documentation for the prefix[...] filter operator (see https://tiddlywiki.com/#prefix%20Operator) says that it supports a “flag list” suffix with values of [prefix:casesensitive[...]] or [prefix:caseinsensitive[...]], with “casesensitive” as the default. Thus, for your purposes, you would use the :caseinsensitive flag value.

enjoy,
-e

1 Like

Thanks for your reply, I’ve tried adding the flag like this: <<list-links [prefix:caseinsensitive[A]]>> but it’s still case sensitive and only lists titles starting with capitalized A

I’m not sure what to think, here. If I paste <<list-links [prefix:caseinsensitive[A]]>> into a new tiddler at tiddlywiki.com, I get a list of titles starting with A or a (case-insensitive). It starts like this:

The suggestion by @EricShulman also works fine on my own wikis (and it’s been a well-documented feature for a couple years, since v5.2.2).

Oh — check to make sure your TiddlyWiki version is at least v5.2.2!

If your wiki is using a recent version… Are you by any chance using two-byte alphabets, or any other hidden text that complicates how the titles work?

One thing you can try, when troubleshooting, is dragging a bunch of your tiddlers over to tiddlywiki.com, and importing them. They won’t save, of course. But you can see what happens there — do your tiddlers called alphabets and Assyrian (for example) show up in the caseinsensitive list there, once you import them?