diff --git a/src/Fenom/Template.php b/src/Fenom/Template.php index 536ccd5..05ce2b2 100644 --- a/src/Fenom/Template.php +++ b/src/Fenom/Template.php @@ -343,8 +343,9 @@ class Template extends Render $text = str_replace("' . 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; } diff --git a/tests/cases/FenomTest.php b/tests/cases/FenomTest.php index dc125b6..e49b66f 100644 --- a/tests/cases/FenomTest.php +++ b/tests/cases/FenomTest.php @@ -324,7 +324,7 @@ class FenomTest extends \Fenom\TestCase number {\$num.1} TPL; - $this->assertRender($tpl, '
number one
'); + $this->assertRender($tpl, '
number one
'); } }