On Monday, September 21, 2020 at 7:47:31 PM UTC-7, TW Tones wrote:
>
> I am building a macro "?" to locate and display information on defined 
> macros.
> However I cant get the basic operation to work, pasting this in a tiddler 
> on tiddlywiki will show these unwanted ]"> ]"> ]"> ]"> ]"> ]"> </$list> 
> after the two top level lists.
> I cant work out why, I would be grateful for a second or more eyes.
>
> \define macro-definition(macroname) \define $macroname$(
\define ?(macroname:"?")
<$wikify name=macro-definition text="""<<macro-definition $macroname$>>""">
searching for: <<macro-definition>>.<br>
<$list filter="""[[$macroname$]match[?]]""">
   Macro to display more about a given macro, `<<? macroname>>`
</$list>
<$list filter="[[$macroname$]!match[?]] variable=nul>
searching for: <<macro-definition>><br>
   <$list 
filter="[all[shadows+tiddlers]search:text:literal<macro-definition>]">

   </$list>
</$list>
</$wikify>
\end

You've left off a close quote in the 2nd $list filter!

Here's my cleaned up revision of your code.  Note there's no need for 
$wikify.
\define ?(macroname:"?")
searching for: \define $macroname$<br>
<$list filter="[[$macroname$]match[?]]">
   Macro to display more about a given macro, ``<<? macroname>>``
</$list>
<$list filter="[[$macroname$]!match[?]]">
   <$list filter="[all[shadows+tiddlers]search:text:literal[\define 
$macroname$]]">

   </$list>
</$list>
\end

With the above code, and a test case of "<<? tag>>", I get the following 
results at http://tiddlywiki.com...

searching for: \define tag
> $:/core/ui/EditTemplate/tags
> $:/Manager/ItemSidebar/Tags
> $:/core/macros/tag-picker
> $:/core/macros/tag
> $:/core
> $:/editions/tw5.com/macro-examples/tags-of-current-tiddler


-e

-- 
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/48a357ee-5695-4d93-bf22-7326651b5f8do%40googlegroups.com.

Reply via email to