On 7 Aug 2009, at 16:15, Richard Cernava wrote:


A "feature" of PHP's is to consume a newline when it is following it's closing tag (http://bugs.php.net/bug.php?id=28381). The reason I bring this up is
because this issue affects PHPTAL's output. Take for example:
<tal:block tal:condition="true">I'm on a line</tal:block>
<tal:block tal:condition="true">I'm on a line</tal:block>

this will be converting into:

<?php if ($ctx->true): ; ?>I'm on a line<?php endif; ?>
<?php if ($ctx->true): ; ?>I'm on a line<?php endif; ?>

The problem now is that when the PHP is executed it will remove the trailing new
line so your real out put will be:

I'm on a lineI'm on a line

The only solution is if the closing tag is at the end of a line to add another
line break.

Thanks. This should be fixed in SVN.

--
regards, Kornel


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to