Moving $orig_tags to render

This commit is contained in:
KevBurnsJr
2011-06-13 00:12:04 -07:00
parent 2a84c544c3
commit 77f9a37b9e
+9 -7
View File
@@ -175,6 +175,9 @@ class Mustache {
public function render($template = null, $view = null, $partials = null) { public function render($template = null, $view = null, $partials = null) {
if ($template === null) $template = $this->_template; if ($template === null) $template = $this->_template;
if ($partials !== null) $this->_partials = $partials; if ($partials !== null) $this->_partials = $partials;
$otag_orig = $this->_otag;
$ctag_orig = $this->_ctag;
if ($view) { if ($view) {
$this->_context = array($view); $this->_context = array($view);
@@ -183,7 +186,12 @@ class Mustache {
} }
$template = $this->_renderPragmas($template); $template = $this->_renderPragmas($template);
return $this->_renderTemplate($template, $this->_context); $template = $this->_renderTemplate($template, $this->_context);
$this->_otag = $otag_orig;
$this->_ctag = $ctag_orig;
return $template;
} }
/** /**
@@ -475,9 +483,6 @@ class Mustache {
return $template; return $template;
} }
$otag_orig = $this->_otag;
$ctag_orig = $this->_ctag;
$first = true; $first = true;
$this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag, true); $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag, true);
@@ -517,9 +522,6 @@ class Mustache {
} }
} }
$this->_otag = $otag_orig;
$this->_ctag = $ctag_orig;
return $html . $template; return $html . $template;
} }