[ZPT] Re: Weird ZPT macro bug

Evan Simpson evan@4-am.com
Mon, 07 Oct 2002 11:11:38 -0500


Andreas Jung wrote:
> When I replace the 'pre' tag by a 'div' tag
>           
>     <div metal:define-macro="transcript_plain">
>       <p tal:repeat="entry here/transcript">
>         <div tal:content="entry/getComment"> </div>
>       </p>
>     </div>

HTMLTALParser considers <div> tags, but not <pre> tags, to be "above" 
paragraph level, so they will implicitly close a <p> tag that you meant 
to nest them in, leaving the </p> tag orphaned.

You could use a <span> tag instead of <div>, in this case.  In general, 
you can use <tal:foo> tags, where 'foo' is whatever you like.

Cheers,

Evan @ 4-am