>>>>> "Paul" == Paul Makepeace <[EMAIL PROTECTED]> writes:
Paul> I'm converting some PHP to TT and am having trouble with the extra
Paul> whitespace that's left behind after TT does its processing. This extra
Paul> \s+ throws out some HTML renderers like IE.
Paul> For example,
Paul> <td>
Paul> [% IF 1 %]
Paul> <img src="foo.jpg">
Paul> [% END %]
Paul> </td>
Paul> the best I can get (with POST_CHOMP and FILTER collapse) is,
Paul> <td> <img src="foo.jpg"></td>
Paul> That extra space between the td and img can damage the rendering.
Paul> Is there a way to have TT remove this extra whitespace?
Setting POST_CHOMP to 1 is my favorite, because it *mostly* does the right
thing. But it's not psychic, since you put a newline after your initial text.
Either also set PRE_CHOMP to 1 (which would swallow that, but sometimes it'll
swallow too much), or leave POST_CHOMP at 1 and write that as:
<td>
[%- IF 1 %]
<img src="foo.jpg">
[%- END %]
</td>
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates