[tw5] Reveal Widget rendering issues.

If I create a new tiddler, and add two fields, field-a and field-b.

In the tiddler I then use the * notation to create some bullet points.

I add some text before field A, then, use the reveal widget to see if field b exists, if it does, I add another “row” to the bullet point list.

If I do this;

  • some text that goes here before {{!!field-a}} and some after.
    <$reveal type=“nomatch” state="!!field-b" text="">
  • some other text thats different to the above {{!!field-b}} and then some more after.
    </$reveal>

then part within the reveal renders as * not as an actual bullet point. but if I do this

  • some text that goes here before {{!!field-a}} and some after.
    <$reveal type=“nomatch” state="!!field-b" text="">

  • some other text thats different to the above {{!!field-b}} and then some more after.
    </$reveal>

Then it renders as a bullet point, but with an CRLF between the two points!

How can I get around this problem?

(PS, I found I had the same problem with the !!! notation for header in that if it was on the line after the open of the reveal it rendered as !!! my text, but if there was a gap then it rendered properly.)

Wikitext syntax relies upon a leading blank line to indicate that “block” mode rendering should be applied to the bullet item. In addition, the bullet item within the $reveal widget also results in a new containing “ul” element which includes a margin above/below, resulting in the unwanted whitespace.

You can work around this by using HTML syntax instead of wikitext syntax, like this:

<ul>
<li>some text that goes here before {{!!fieldA}} and some after.</li>
<$reveal type="nomatch" state="!!fieldB" text="">
<li>some other text thats different to the above {{!!fieldB}} and then some more after.</li>
</$reveal>
</ul>
1 Like

Thanks, I was afraid that was the answer though I did not know the reason.