<$let
myCur=<<currentTiddler>>
sp=""" """
img1="\[img\["
img2=".png\]\]"
img3=".jpg\]\]"
imgs={{{ [<myCur>get[text]search-replace:gi:regexp[\n],<sp>search-replace:gi:regexp<delink>,[]search-replace:gi:regexp<img1>,[@1@@]split[@1]prefix[@@]search-replace:gi:regexp<img2>,[.png@@]split[@@]regexp[(\.png$)]format:titlelist[]join[ ]] ~[<myCur>transcludes[]suffix[.png]format:titlelist[]join[ ]] }}}
delink="\[\[.*?\]\]"
>
<$list filter="[enlist<imgs>]" variable="img">
I have images in my tiddlers in two formats
- [img[image-name]]
- {{image-tiddler-name.png}}
Some tiddlers have transcluded images, while some tiddlers have images in [img[]]
format. I want to list all the images of both these formats and display them using a viewtemplate. But the above code is not listing the transcluded images.
imgs={{{ [<myCur>get[text]search-replace:gi:regexp[\n],<sp>search-replace:gi:regexp<delink>,[]search-replace:gi:regexp<img1>,[@1@@]split[@1]prefix[@@]search-replace:gi:regexp<img2>,[.png@@]split[@@]regexp[(\.png$)]format:titlelist[]join[ ]] ~[<myCur>transcludes[]suffix[.png]format:titlelist[]join[ ]] }}}
This part of the code may not be correct. Can someone help ?