Re: [PHPTAL] PHP newline consumption

2009-12-10 Thread Kornel LesiƄski

On 10-12-2009 at 03:18:56 romtek  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

2009-12-09 Thread romtek
This would also be useful for generating plain text email.

On Wed, Dec 9, 2009 at 5:59 PM, Tjerk Meesters wrote:

> 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
>  ?
>
> On 12/10/09, 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:
> >> > I'm on a line
> >> > I'm on a line
> >>
> >> 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

2009-12-09 Thread Tjerk Meesters
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
 ?

On 12/10/09, 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:
>> > I'm on a line
>> > I'm on a line
>>
>> 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


Re: [PHPTAL] PHP newline consumption

2009-08-10 Thread Kornel Lesinski

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:
I'm on a line
I'm on a line

this will be converting into:

true): ; ?>I'm on a line
true): ; ?>I'm on a line

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