For now that is the best we have.
However from the next TW release we can use format:titlelist[]
https://tiddlywiki.com/prerelease/#format%20Operator
On Tuesday, June 22, 2021 at 11:18:55 PM UTC+2 [email protected] wrote:
> 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/ad14ef20-d1da-4b55-aaac-17407cf240d1n%40googlegroups.com.