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 fc22a81..2e11ed4 100644
--- a/stupid_template_engine.php
+++ b/stupid_template_engine.php
@@ -136,7 +136,7 @@ function tokenize_text($text, $tpl, $off)
if(preg_match("/(?:(?<!\\\\)\\$)/s", $text, $match, PREG_OFFSET_CAPTURE) == 0)
{
$node = new TextNode($tpl, $off);
- $node->text = preg_replace("/^\\n\\s*/s", "", unescape_text($text));
+ $node->text = preg_replace("/^(?:\\n|\\r\\n|\\r)\\s*/s", "", unescape_text($text));
return (strlen($node->text) == 0) ? array() : array($node);
}