Fix for stripping leading/trailing whitespace from partial names,
per http://github.com/janl/mustache.js/issues/issue/34/#comment_244396
This commit is contained in:
+1
-1
@@ -144,7 +144,7 @@ class Mustache {
|
||||
protected function _renderSection($template, &$context) {
|
||||
$otag = $this->_prepareRegEx($this->_otag);
|
||||
$ctag = $this->_prepareRegEx($this->_ctag);
|
||||
$regex = '/' . $otag . '(\\^|\\#)(.+?)' . $ctag . '\\s*([\\s\\S]+?)' . $otag . '\\/\\2' . $ctag . '\\s*/m';
|
||||
$regex = '/' . $otag . '(\\^|\\#)\\s*(.+?)\\s*' . $ctag . '\\s*([\\s\\S]+?)' . $otag . '\\/\\s*\\2\\s*' . $ctag . '\\s*/m';
|
||||
|
||||
$matches = array();
|
||||
while (preg_match($regex, $template, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
|
||||
Reference in New Issue
Block a user