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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/cf0dbe20-464a-42e0-96ef-3cfeef71154an%40googlegroups.com.

Reply via email to