Re: [PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Kornel Lesiński

On 09-12-2009 at 23:06:40 Richard Cernava cern...@gmail.com wrote:

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);


Can you send me example template that exposes the problem?

I'd rather not fix it by find'n'replace, as it could change other XML  
processing instructions, markup in CDATA etc.


--
regards, Kornel

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


[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński kor...@... writes:

 
 On 09-12-2009 at 23:06:40 Richard Cernava cern...@... wrote:
 
  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);
 
 Can you send me example template that exposes the problem?
 
 I'd rather not fix it by find'n'replace, as it could change other XML  
 processing instructions, markup in CDATA etc.
 


Kornel Lesiński kor...@... writes:

 
 On 09-12-2009 at 23:06:40 Richard Cernava cern...@... wrote:
 
  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);
 
 Can you send me example template that exposes the problem?
 
 I'd rather not fix it by find'n'replace, as it could change other XML  
 processing instructions, markup in CDATA etc.

I much agree, I don't like it either.

html
body 
${variable1 | string:Line 1}
tal:block tal:content=variable2 | string:Line 2/tal:block
Line 3
/body
/html

Renders:

Line 1  Line 2
Line 3

TAL block seems to add another line break after Line 2, but variable does not.


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