I managed to fix the filter but I still feel there must be an easier way to
do it.
<$vars prefix="[[" suffix="]]">
<$button>
<$action-sendmessage
$message="tm-new-tiddler"
source={{{
[all[current]regexp[\s]addprefix<prefix>addsuffix<suffix>else{!!title}] }}}
author={{!!author}}/>
Add
</$button>
</$vars>
On Tuesday, 22 June 2021 at 23:10:04 UTC+2 Sebastián Ortega wrote:
> Hello wise tiddlywiki users,
>
> Let's say I want to convert the current tiddler title into list format.
> For example:
>
> - For a tiddler named CamelCased, this is either CamelCased or
> [[CamelCased]] (I prefer the format but I can settle with the latter)
> - For a tiddler named Name with spaces it must be [[Name with spaces]]
>
> I'm stuck with trying to add squared brackets conditionally
> [all[current]regexp[\s]addprefix[[[]addsuffix[]]]else{!!title}] because
> that's not the right syntax for adding the brackets and also because this
> feels common enough that it should be some easier way to "escape" a string
> to a title list format.
>
> Do you know how to get it?
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/e56858cc-32ea-4204-b571-9c31e796cc7en%40googlegroups.com.