summaryrefslogtreecommitdiff
path: root/stupid_template_engine.php
diff options
context:
space:
mode:
Diffstat (limited to 'stupid_template_engine.php')
-rw-r--r--stupid_template_engine.php2
1 files changed, 1 insertions, 1 deletions
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("/(?:(?<!\\\\)\\$)/s", $text, $match, PREG_OFFSET_CAPTURE) == 0)
{
$node = new TextNode();
- $node->text = unescape_text($text);
+ $node->text = preg_replace("/^\\n\\s*/s", "", unescape_text($text));
return (strlen($node->text) == 0) ? array() : array($node);
}