A little better macro
\define standardSearch()
<$set name=searchFilter
value="[all[tiddlers]!is[system]search:title,caption,text[$(searchTerms)$]]">
//<small>Standard search: <$count filter=<<searchFilter>> />
matches</small>//<br>
<$list filter=<<searchFilter>> >
<$link/><br>
</$list>
</$set>
\end
\define filterSearch()
//<small>Filter search: <$count filter=<<searchTerms>>/>
matches</small>//<br><!--for debugging-->
<$list filter=<<searchTerms>> >
<$link/><br>
</$list>
\end
\define combo-search()
<$vars pattern="^\["
stateTid="$:/temp/comboSearch">
<!--UI -->
combo search <$edit-text tiddler=<<stateTid>> tag=input/>
<!-- show results if any-->
<$reveal state=<<stateTid>> type="nomatch" text=""><!--do not display when
searchbox is empty-->
<$button class="tc-btn-invisible">
<$action-setfield $tiddler=<<stateTid>> $field="text" $value=""/>
{{$:/core/images/close-button}}
</$button><br>
<$set name=searchTerms tiddler=<<stateTid>> field=text>
<$list filter="[<searchTerms>trim[]minlength[3]limit[1]]"
emptyMessage="Search text too short" variable=ignore>
<!-- Check input search term -->
<div class="tc-search-results">
<$list filter="[<searchTerms>trim[]regexp<pattern>]"
emptyMessage=<<standardSearch>> >
<<filterSearch>>
</$list>
</div>
</$list>
</$set>
</$reveal>
</$vars>
\end
<<combo-search>>
*Question*:
1. what is the best regexp pattern here?
2. how to improve the performance
--
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/85717351-075c-41fa-94af-64a6bf240755%40googlegroups.com.