Merge branch 'dev' into feature/whitespace-overhaul

This commit is contained in:
Justin Hileman
2010-11-26 14:33:23 -05:00
2 changed files with 10 additions and 15 deletions
+6 -15
View File
@@ -510,21 +510,6 @@ class Mustache {
*/ */
protected function _renderTag($modifier, $tag_name, $whitespace) { protected function _renderTag($modifier, $tag_name, $whitespace) {
switch ($modifier) { switch ($modifier) {
case '#':
case '^':
if ($this->_throwsException(MustacheException::UNCLOSED_SECTION)) {
throw new MustacheException('Unclosed section: ' . $tag_name, MustacheException::UNCLOSED_SECTION);
} else {
return '';
}
break;
case '/':
if ($this->_throwsException(MustacheException::UNEXPECTED_CLOSE_SECTION)) {
throw new MustacheException('Unexpected close section: ' . $tag_name, MustacheException::UNEXPECTED_CLOSE_SECTION);
} else {
return '';
}
break;
case '=': case '=':
return $this->_changeDelimiter($tag_name); return $this->_changeDelimiter($tag_name);
break; break;
@@ -547,6 +532,12 @@ class Mustache {
return $this->_renderUnescaped($tag_name); return $this->_renderUnescaped($tag_name);
} }
break; break;
case '#':
case '^':
case '/':
// remove any leftovers from _renderSections
return '';
break;
} }
if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) { if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) {
+4
View File
@@ -3,4 +3,8 @@
<testsuite name="Mustache"> <testsuite name="Mustache">
<directory>./</directory> <directory>./</directory>
</testsuite> </testsuite>
<blacklist>
<directory suffix=".php">../examples</directory>
<directory suffix=".php">./</directory>
</blacklist>
</phpunit> </phpunit>