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 <http://localhost:10744/#WikiLink> NoWikiLink 
<http://localhost:10744/#NoWikiLink>

<http://localhost:10744/#WikiLink>

    WikiLink <http://localhost:10744/#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 <https://tiddlywiki.com/#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.

Reply via email to