Hi David The first wikify widget in the example below generates a string of HTML code "<h1 class="">My Heading</h1>” which you can see when it is directly displayed by the text widget. When you use the double angle bracket syntax to render it, that HTML string gets wikified a second time, and the <h1> HTML tag is rendered into the equivalent wikitext.
In the case of the second wikify widget, you’re wikifying a text widget that renders the plain text of the variable. Thus, the result stored in the testOutput2 variable is the plain text of the original testVar. Then, when you render it with double angle brackets, it is wikified again, but in inline mode, and so the “!” isn’t recognised as a heading because it is block level. Best wishes Jeremy > On 21 Jan 2019, at 13:30, David Nebauer <[email protected]> wrote: > > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/tiddlywiki > <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 > > <https://groups.google.com/d/msgid/tiddlywiki/6f49ddac-336e-4f83-b5db-cca634f2e9f3%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <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/ED8BC4E2-4D10-4CB4-8CF2-697658AC66B6%40gmail.com. For more options, visit https://groups.google.com/d/optout.

