@Saq - thanks, I actually tried that, but the problem is that emptyMessage
doesn't know what {{!!title}} is, so to say. (It would be desirable that it
did!)
<:-)
On Tuesday, April 20, 2021 at 10:26:55 AM UTC+2 Saq Imtiaz wrote:
> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/59f5e92a-7e7f-4851-a347-cd4c768d4e82n%40googlegroups.com.