Dave,

I have gone down this path before. In various batch/command languages there 
is a reference for all parameters in a macro but not in tiddlywiki, but I 
do not see what you gain with your laziness, other than more complexity, 
thus work. Here are a few ways to call a macro with multiple words; I could 
possibly come up with half  dozen more if you want.

\define h(txt) <mark>$txt$</mark>
\define hvar() <mark>$(text)$</mark>
\define hfield(fieldname) <mark>{{!!$fieldname$}}</mark>


<<h text to highlight>>
<<h "text in quotes">>
<<h 'text in single quotes'>>
<<h """text in triple quotes""">>
<<h txt:"text as named parameter">>
<$macrocall $name=h txt="text as named parameter in macrocall"/>


<<h """
This allows even sentences
to be passed across<br>
multiple lines in one parameter
""">>


<$macrocall $name=h 
txt="text as named parameter in macrocall"/>


<<hfield caption>>


<$set name=text value="Text in a specific variable name">
<<hvar>>
</$set>

But perhaps just use this 
plugin http://tongerner.tiddlyspot.com/#%24%3A%2Fplugins%2Ftg%2Fhighlight-button

Regards
Tony


On Wednesday, April 15, 2020 at 6:19:35 AM UTC+10, Dave wrote:
>
> Here's a simple macro for highlighting text:
> \define h(txt) <mark>$txt$</mark>
> <<h text to highlight>>
>
>
> but the way I have it, it just shows "text" highlighted.
>
> If I do this <<h 'text to highlight,>> then it works fine.
>
>
> But, seeing as I'm *super lazy*, I was wondering if there's a way to 
> change the macro itself to accept all the text sent to is as one blob
>
> I tried
>  \define h(txt) <mark>"$txt$"</mark>
> but it just showed "text" (with yellow highlight)
>
> Any ideas?
>
> Thanks,
> - Dave
>
>
>
>

-- 
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/ba35c0e1-3fe8-4bf6-b671-a9598205f982%40googlegroups.com.

Reply via email to