From f3cb0877ffde97b7278a8c03725242eac5d835e6 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sat, 30 Oct 2010 16:53:14 -0400 Subject: [PATCH] Add support for 'less-than' partial notation. --- Mustache.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Mustache.php b/Mustache.php index 60e66c8..4d8b492 100644 --- a/Mustache.php +++ b/Mustache.php @@ -385,7 +385,7 @@ class Mustache { $otag = preg_quote($this->_otag, '/'); $ctag = preg_quote($this->_ctag, '/'); - $this->_tagRegEx = '/' . $otag . "([#\^\/=!>\\{&])?(.+?)\\1?" . $ctag . "+/s"; + $this->_tagRegEx = '/' . $otag . "([#\^\/=!<>\\{&])?(.+?)\\1?" . $ctag . "+/s"; $html = ''; $matches = array(); @@ -442,6 +442,7 @@ class Mustache { return $this->_renderComment($tag_name); break; case '>': + case '<': return $this->_renderPartial($tag_name); break; case '{': @@ -521,7 +522,7 @@ class Mustache { $otag = preg_quote($this->_otag, '/'); $ctag = preg_quote($this->_ctag, '/'); - $this->_tagRegEx = '/' . $otag . "([#\^\/=!>\\{&])?(.+?)\\1?" . $ctag . "+/s"; + $this->_tagRegEx = '/' . $otag . "([#\^\/=!<>\\{&])?(.+?)\\1?" . $ctag . "+/s"; return ''; }