Re: [PHPTAL] PHP newline consumption
On 10-12-2009 at 03:18:56 romtek rom...@gmail.com wrote: This would also be useful for generating plain text email. People, please! Stop wasting your time with PHPTAL and plaintext! It's deliberately *not* supported. http://phptal.org/wiki/doku.php/plaintext -- regards, Kornel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] PHP newline consumption
This would also be useful for generating plain text email. On Wed, Dec 9, 2009 at 5:59 PM, Tjerk Meesters tjerk.meest...@gmail.comwrote: Just out of curiosity, why does this bother you? In (x)html newlines are at best considered one white-space. Are you using this inside pre ? On 12/10/09, Richard Cernava cern...@gmail.com 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=trueI'm on a line/tal:block tal:block tal:condition=trueI'm on a line/tal:block Thanks. This should be fixed in SVN. I hate to bring this back up, but this does not seem to be fixed. I'm running PHPTal 1.2.2a1. inside function prepare() I added the preg_replace underneath $result = $this-parse(); to fix it for now. $result = preg_replace('/\?\r?\n/', ?\r\n\r\n, $result); ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal -- -- Tjerk ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] PHP newline consumption
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=trueI'm on a line/tal:block tal:block tal:condition=trueI'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
[PHPTAL] PHP newline consumption
Hi, 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=trueI'm on a line/tal:block tal:block tal:condition=trueI'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. ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal