diff --git a/README.markdown b/README.markdown index bc50bf5..0634a0f 100644 --- a/README.markdown +++ b/README.markdown @@ -82,7 +82,6 @@ Known Issues ------------ * Sections don't respect delimiter changes -- `delimiters` example currently fails with an "unclosed section" exception. - * Since `complex` example emulates some fancy swizzling available in Ruby, it fails. Need to convert example to PHPisms (In PHP, Mustache class doesn't maintain current context stack -- available context is passed to methods via params). * Test coverage is incomplete. diff --git a/examples/complex/complex.mustache b/examples/complex/complex.mustache index f3d8fea..4bf1687 100644 --- a/examples/complex/complex.mustache +++ b/examples/complex/complex.mustache @@ -5,9 +5,9 @@ {{#current}}
  • {{name}}
  • {{/current}} - {{#isLink}} + {{^current}}
  • {{name}}
  • - {{/isLink}} + {{/current}} {{/item}} {{/notEmpty}} diff --git a/examples/complex/complex.php b/examples/complex/complex.php index ca32ed7..ea55418 100644 --- a/examples/complex/complex.php +++ b/examples/complex/complex.php @@ -9,11 +9,6 @@ class Complex extends Mustache { array('name' => 'blue', 'current' => false, 'url' => '#Blue'), ); - public function isLink() { - // Exploit the fact that the current iteration item is at the top of the context stack. - return $this->getVariable('current', $this->context) != true; - } - public function notEmpty() { return !($this->isEmpty()); }