There does not appear to be a universal rule such as: "to prevent double
wikification, always use a <$text> widget when loading a $<wikify> widget
from a variable."
To show what I mean, consider this variation of Jeremy's test rig where I
set the variable to a heading string:
<$set name="testVar" value="! My Heading">
<$wikify name="testOutput1" text=<<testVar>> output="html">
<$text text=<<testOutput1>>/>
<<testOutput1>>
</$wikify>
<$wikify name="testOutput2" text="<$text text=<<testVar>>/>"
output="html">
<$text text=<<testOutput2>>/>
<<testOutput2>>
</$wikify>
</$set>
It results in this output:
<h1 class="">My Heading</h1>
My Heading
<p>! My Heading</p>
! My Heading
In this case the outcome is the opposite of the experience with tildes and
wikitext: using the <$text> widget results in the "wrong" result.
Is there a universal technique to ensure any variable value will be
rendered "correctly," or is it necessary to experiment with your input to
determine whether to use <$text> with it or not?
David.
On Monday, 21 January 2019 00:09:28 UTC+9:30, Jeremy Ruston wrote:
>
> I think that the problem here may be the use of double angle brackets to
> render <<testOutput1>> and <<testOutput2>> which causes the content of
> those variables to be wikified. In this case, you've already wikified the
> content of the variable, so you'll be wikifying it twice.
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6f49ddac-336e-4f83-b5db-cca634f2e9f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.