Removing renderSection short-circuit, as it doesn't actually improve performance.
This commit is contained in:
@@ -114,10 +114,6 @@ class Mustache {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function renderSection($template, &$context) {
|
protected function renderSection($template, &$context) {
|
||||||
if (strpos($template, $this->otag . '#') === false && strpos($template, $this->otag . '^') === false) {
|
|
||||||
return $template;
|
|
||||||
}
|
|
||||||
|
|
||||||
$otag = $this->prepareRegEx($this->otag);
|
$otag = $this->prepareRegEx($this->otag);
|
||||||
$ctag = $this->prepareRegEx($this->ctag);
|
$ctag = $this->prepareRegEx($this->ctag);
|
||||||
$regex = '/' . $otag . '(\\^|\\#)(.+?)' . $ctag . '\\s*([\\s\\S]+?)' . $otag . '\\/\\2' . $ctag . '\\s*/m';
|
$regex = '/' . $otag . '(\\^|\\#)(.+?)' . $ctag . '\\s*([\\s\\S]+?)' . $otag . '\\/\\2' . $ctag . '\\s*/m';
|
||||||
|
|||||||
Reference in New Issue
Block a user