This commit is contained in:
bzick 2014-10-30 23:56:16 +03:00
parent 0091b17c8a
commit c238053e99
2 changed files with 4 additions and 3 deletions

View File

@ -343,8 +343,9 @@ class Template extends Render
$text = str_replace("<?", '<?php echo "<?"; ?>' . PHP_EOL, $text);
}
if($this->_options & Fenom::AUTO_STRIP) {
$text = preg_replace('/\s+/uS', ' ', $text);
$text = preg_replace('/\s*([\pP\pS]+)\s*/uS', '$1', $text);
$text = preg_replace('/\s+/uS', ' ', str_replace(array("\r", "\n"), " ", $text));
// $text = preg_replace('/\s*([\pP\pS]+)\s*/uS', '$1', $text);
}
$this->_body .= $text;
}

View File

@ -324,7 +324,7 @@ class FenomTest extends \Fenom\TestCase
<a href="/item/{\$one}">number {\$num.1}</a>
</div>
TPL;
$this->assertRender($tpl, '<div class="item item-one"><a href="/item/1">number one</a></div>');
$this->assertRender($tpl, '<div class="item item-one"> <a href="/item/1">number one</a> </div>');
}
}