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.
A modified version of your example with the addition of a couple of text
widgets to render the variables as raw text lets you see what's going on:
<$set name="testVar" value="WikiLink ~NoWikiLink">
<!-- I expect <$wikify> to honour the tilde, but it does not -->
<$wikify name="testOutput1" text=<<testVar>> output="html">
<$text text=<<testOutput1>>/>
<<testOutput1>>
</$wikify>
<!-- I expect <$text> to have no effect, but it results in correct behaviour
from <$wikify> -->
<$wikify name="testOutput2" text="<$text text=<<testVar>>/>" output="html">
<$text text=<<testOutput2>>/>
<<testOutput2>>
</$wikify>
</$set>
The output is:
<p><a class="tc-tiddlylink tc-tiddlylink-missing" href="#WikiLink">WikiLink</a>
NoWikiLink</p>
WikiLink NoWikiLink
<p>WikiLink ~NoWikiLink</p>
WikiLink NoWikiLink
You can see how the displayed HTML is rendered as the output immediately
following it.
Best wishes
Jeremy
--
Jeremy Ruston
[email protected]
https://jermolene.com
> On 20 Jan 2019, at 13:12, David Nebauer <[email protected]> wrote:
>
> In playing about with listing tiddlers I discovered that passing a value like
> "~WikiLink" to <$wikify> resulted in it being rendered as a wikilink despite
> the tilde. However, adding a <$text> widget caused <$wikify> to behave as I
> expected.
>
> Here is an example:
>
> <$set name="testVar" value="WikiLink ~NoWikiLink">
>
> <!-- I expect <$wikify> to honour the tilde, but it does not -->
>
> <$wikify name="testOutput1" text=<<testVar>> output="html">
> <<testOutput1>>
> </$wikify>
>
> <!-- I expect <$text> to have no effect, but it results in correct
> behaviour from <$wikify> -->
>
> <$wikify name="testOutput2" text="<$text text=<<testVar>>/>" output="html">
> <<testOutput2>>
> </$wikify>
>
> </$set>
>
> This resulted in the following output:
>
> WikiLink NoWikiLink
> WikiLink NoWikiLink
>
>
>
> I don't understand why the <$wikify> widget does not honour the tilde.
>
>
>
> I don't understand why adding a <$text> widget causes the <$wikify> widget to
> behave as expected.
>
>
>
> I'm sure this makes sense to someone with intimate knowledge of how these
> widgets operate, but it is counterintuitive to newbies who expect <$wikify>
> to render wikitext, and <$text> to do the opposite, as described in
> TextWidget help.
>
>
>
> Is there a better solution than the <$text> one I stumbled across?
>
> --
> 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/d7b6c1ce-b05b-48cc-99af-999e347b50b5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
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/DAD598E5-F475-4E07-81D1-94C73E1C1A98%40gmail.com.
For more options, visit https://groups.google.com/d/optout.