From 5e7f0ea4bded0f3c52c6959632de2c1a9f73e680 Mon Sep 17 00:00:00 2001 From: KevBurnsJr Date: Mon, 13 Jun 2011 00:12:47 -0700 Subject: [PATCH] Relocating _renderTags($before) since _renderTags now has the ability to modify delimiters --- Mustache.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mustache.php b/Mustache.php index b6b08e1..d0c0da6 100644 --- a/Mustache.php +++ b/Mustache.php @@ -219,8 +219,11 @@ class Mustache { * @return string Rendered Mustache template. */ protected function _renderTemplate($template) { + if ($section = $this->_findSection($template)) { list($before, $type, $tag_name, $content, $after) = $section; + + $rendered_before = $this->_renderTags($before); $renderedContent = ''; $val = $this->_getVariable($tag_name); @@ -252,7 +255,7 @@ class Mustache { break; } - return $this->_renderTags($before) . $renderedContent . $this->_renderTemplate($after); + return $rendered_before . $renderedContent . $this->_renderTemplate($after); } return $this->_renderTags($template);