diff --git a/Mustache.php b/Mustache.php
index fc7bd32..56fb153 100644
--- a/Mustache.php
+++ b/Mustache.php
@@ -510,21 +510,6 @@ class Mustache {
*/
protected function _renderTag($modifier, $tag_name, $whitespace) {
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 '=':
return $this->_changeDelimiter($tag_name);
break;
@@ -547,6 +532,12 @@ class Mustache {
return $this->_renderUnescaped($tag_name);
}
break;
+ case '#':
+ case '^':
+ case '/':
+ // remove any leftovers from _renderSections
+ return '';
+ break;
}
if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) {
diff --git a/test/phpunit.xml b/test/phpunit.xml
index c70e6b0..891fa8e 100644
--- a/test/phpunit.xml
+++ b/test/phpunit.xml
@@ -3,4 +3,8 @@
./
+
+ ../examples
+ ./
+
\ No newline at end of file