FYI

In many button tiddlers you will see
\whitespace trim
at the top

\define mymacro()
\whitespace trim
Macros def
\end

Also your filter seems broken
[[<base>] [<wcagTechDict "$ref$">] [/$ref$] +[join[]]]

here is my Guess
[<base>] [<wcagTechDict "$ref$">] [/$ref$] +[join[]]
But what is [/$ref$]

Regards
Tones


On Friday, 25 September 2020 04:14:03 UTC+10, Jean-Pierre Rivière wrote:
>
> I have spaces surrounding the result of my macro call, even though the 
> result is spaceless. Yet again somethink that I must have overlooked...
>
> Here is the macros code:
>
> \define getWcagDir() <$transclude tiddler="$:/user/dict/wcag/ref/cat" 
> index="$(codeFamily)$"/>
> \define wcagTechDict(ref)
> <$set name="codeFamily" filter="[[$ref$]splitregexp[\d+]join[]]">
> <$macrocall $name="getWcagDir"/>
> </$set>
> \end
> \define wcagUrl(ref)
> <$set name="base" value="https://www.w3.org/WAI/WCAG21/Techniques/";>
> <<base>><<wcagTechDict "$ref$">>/$ref$ />
> </$set>
> \end
>
> Here is the dictionnary $:/user/dict/wcag/ref/cat
>
> ARIA:aria
> C:css
> F:failures
> G:general
> H:html
> SCR:client-side-script
> SM:smil
> SVR:server-side-script
>
> Here is the user code with call to the wcagUrl macro
>
> SM8 in <<wcagTechDict SM8>> to <<wcagUrl SM8>>
>
> Here is the result:
>
> SM8 in smil to https://www.w3.org/WAI/WCAG21/Techniques/ smil /SM8
>
> (with a link only from https: up to Techniques/ which is also a problem).
>
> I tried a trim[] after the join[] in the filter. It was redundant, it had 
> no effect.
>
> I tried an other definition for this macro:
>
> \define wcagUrl(ref)
> <$set name="base" value="https://www.w3.org/WAI/WCAG21/Techniques/";>
> <$set name="url" filter="[[<base>] [<wcagTechDict "$ref$">] [/$ref$] 
> +[join[]]]">
> <<url>>
> </$set>
> </$set>
> \end
>
> but the result is beyond me:
>
> SM8 in smil to <$set name="url" filter="<base>] [<wcagTechDict "SM8">] 
> [/SM8] +[join[]"> </$set>
>
> (with a link from <base> up to +[join[ in the bargain).
>
> Any idea you gurus? (as an ancient Amiga owner, I respect much gurus!)
>
>
>
>

-- 
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/f9413f72-615a-4d2b-ae94-0594d73f8dc5o%40googlegroups.com.

Reply via email to