Thank you, your explanation it makes it very clear what's going on. Whoops 
:D!

> Either way, it's going to be "more typing" (but only a little).  Still, 
its less typing than the full `<$macrocall ...>` widget syntax.

In this case, I will be using the `<$macrocall ...>` syntax because I want 
to create a template tiddler using `tm-new-tiddler`. This template contains 
wikitext which field-transcludes a URL field. However, if I want to create 
a generic macro for links where I might want to specify the URL scheme, I 
know to watch out for my colons this time :D!


On Monday, September 20, 2021 at 8:35:52 AM UTC-4 Eric Shulman wrote:

> On Monday, September 20, 2021 at 12:35:18 AM UTC-7 [email protected] 
> wrote:
>
>> I can make the first method work by putting the URL in quotes, but I 
>> would like to avoid that in general because it's more typing :): 
>> `<<todoLink "http://foo.org"; bar>>`. Why are the quotes required? I 
>> thought macro expansion substituted text without treating the macro inputs 
>> as WikiText?
>>
>
> The `<<macroname param param param>>` syntax, in addition to handling 
> *unnamed* parameters, also recognizes *named* parameters, using 
> `name:value`.
> Thus, a value like `http://foo.org` is parsed as a parameter named 
> "http", with a value of "//foo.org".  By enclosing it in quotes, it 
> avoids the named parameter parsing and passes it into the macro as a single 
> parameter value
>
> So... you can use the quotes to bypass the parameter name parsing: 
> `<<todoLink "http://foo.org"; bar>>`
> or, you can add a parameter *name*, like this:  `<<todoLink url:
> http://foo.org bar>>`.
>
> Either way, it's going to be "more typing" (but only a little).  Still, 
> its less typing than the full `<$macrocall ...>` widget syntax.
>
> -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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e26ed45a-4043-4fb1-8f15-36fb06780been%40googlegroups.com.

Reply via email to