You could also try something like this (untested):

\define linkOrExt(url)
<$list filter="""$url$ +[split[#]rest[]decodeuri[]join[ ]!is[missing]]""" 
emptyMessage="""<a href=<<__url__>> rel="noopener noreferrer" 
target="_blank">{{!!title}}</a>"""> {{{ 
[<__url__>split[#]rest[]decodeuri[]join[ ]] }}} </$list>
\end

On Tuesday, April 20, 2021 at 10:24:31 AM UTC+2 Mat wrote:

> Saq Imtiaz wrote:
>
>> Use a filter run prefix.
>>
>
> Appreciated. That'll be useful in other cases but it turns out it was not 
> relevant for this issue.
>
> ----------------
>
>
> But formulating the problem that emptyMessage was not linkified did spark 
> some thoughts so the current status is decent enough:
>
> \define linkOrExt(url)
> <$vars
>    link={{{ $url$ +[split[#]rest[]decodeuri[]join[ ]] }}}
>    lbrack="[["  rbrack="]]">
> <$list
>    filter="""[<link>is[missing]]"""
>    emptyMessage={{{ [<link>addprefix<lbrack>addsuffix<rbrack>] }}} >
>   <a href="""$url$""" rel="noopener noreferrer" 
> target="_blank">{{!!title}}</a>
> </$list>
> </$vars>
> \end
>
> Decent enough.
> Thank you.
>
> <:-)
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2300b58a-188f-4068-8bbf-fed1c987199cn%40googlegroups.com.

Reply via email to