#014898: Deactivate whitespace removal in Template output

Description:

The Template component tries to fix code indentation whitespaces as good as possible. With this, it also removes whitespaces, which are intended to appear in the generated code (see example). An option to deactivate whitespace removal would be good. A better heuristic to detect template code identation whitespaces would also be nice.


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


Steps to Reproduce:

-------------- PHP code -------------
<?php

require_once 'Base/src/ezc_bootstrap.php';

$conf               = ezcTemplateConfiguration::getInstance();
$conf->templatePath = 'run-tests-tmp';
$conf->compilePath  = 'run-tests-tmp';

$tpl = new ezcTemplate();

$tpl->send->arr = array( 'foo', 'bar', 'baz' );

echo $tpl->process( 'foo.ezt' );

?>
-------------- Template code -------------
{use $arr}

        {foreach $arr as $val}
            {$val}
        {/foreach}
-------------- Result -------------
        foo
bar
baz

- Attachments

No attachments for this issue.


- Comments

Fixed in rev. #10311.

#261712 by Derick Rethans on May 25th, 2009 [Permanent Link]

- History
Properties
Type Enhancement
Priority Medium
Component Components » Template
Affects Unknown
Fix Version 2009.1alpha1 - eZ components 2009.1alpha1
Reporter Tobias Schlitt
Responsible Derick Rethans
Status 0 Closed
Resolution Implemented
Created May 12th, 2009
Updated May 25th, 2009
Resolved May 25th, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels