From bc0ea34989618d8747076c322c14d0cd6af591b2 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 22 Sep 2011 14:02:22 +0200 Subject: Newlines are now treated more XML/HTML-alike. Newlines and following whitespaces at the beginning of a TextNode will be ignored now. --- stupid_template_engine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stupid_template_engine.php') diff --git a/stupid_template_engine.php b/stupid_template_engine.php index c6b48bc..d36352d 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -94,7 +94,7 @@ function tokenize_text($text) if(preg_match("/(?:(?text = unescape_text($text); + $node->text = preg_replace("/^\\n\\s*/s", "", unescape_text($text)); return (strlen($node->text) == 0) ? array() : array($node); } -- cgit v1.2.3-70-g09d2