html bleeding through from template or macro?

54 views
Skip to first unread message

amreus

unread,
Aug 9, 2020, 10:48:27 PM8/9/20
to TiddlyWiki
Hi.

Trying to understand templates and macros.  Can someone see why the HTML is bleeding through from my template and/or macros?


Thanks.

Eric Shulman

unread,
Aug 9, 2020, 11:02:41 PM8/9/20
to TiddlyWiki
On Sunday, August 9, 2020 at 7:48:27 PM UTC-7, amreus wrote:
Trying to understand templates and macros.  Can someone see why the HTML is bleeding through from my template and/or macros?

In personViewTemplate, you have an opening <p>, but no matching </p>

Although it has been common practice to use <br> and <p> as unmatched HTML tags,
they are actually supposed to be matched with corresponding </br> and </p> tags

For <br>, you can still get away with leaving it unmatched, or use <br /> to terminate it right away.
For <p>, you really have to match it, or use <p /> to terminate it right away.

Thus, two possible fixes for your template:
<$list filter="[all[current]tag[person]]">
<fieldset>
<legend>&nbsp; [[personViewTemplate]]  &nbsp;</legend>
Born {{!!birt-date}}
<p>
<
<parents>>
<
<siblings>>
<
<children>>
</p>
</fieldset>
</$list>

or

<$list filter="[all[current]tag[person]]">
<fieldset>
<legend>&nbsp; [[personViewTemplate]]  &nbsp;</legend>
Born {{!!birt-date}}
<p/>
<
<parents>>
<
<siblings>>
<
<children>>
</fieldset>
</$list>

enjoy,
-e

Mat

unread,
Aug 10, 2020, 1:28:46 AM8/10/20
to TiddlyWiki
@amreus, I note you're using the SideEditor. There was a bug which might have something to do with your problem (there was an extraneous </style> tag). I've corrected it so please update to latest version.

<:-)

amreus

unread,
Aug 10, 2020, 4:43:51 PM8/10/20
to TiddlyWiki
Thanks for the help, Eric. Properly closing tags solved it.

@Mat, SideEditor was not the problem - I have installed the latest version. Looking nice. Any chance for using ctrl-enter to save?
Reply all
Reply to author
Forward
0 new messages