Trailing whitespace cleanup.
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ class Mustache {
|
|||||||
|
|
||||||
// Override charset passed to htmlentities() and htmlspecialchars(). Defaults to UTF-8.
|
// Override charset passed to htmlentities() and htmlspecialchars(). Defaults to UTF-8.
|
||||||
protected $charset = 'UTF-8';
|
protected $charset = 'UTF-8';
|
||||||
|
|
||||||
protected $tagRegEx;
|
protected $tagRegEx;
|
||||||
|
|
||||||
protected $template = '';
|
protected $template = '';
|
||||||
|
|||||||
@@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
class Complex extends Mustache {
|
class Complex extends Mustache {
|
||||||
public $header = 'Colors';
|
public $header = 'Colors';
|
||||||
|
|
||||||
public $item = array(
|
public $item = array(
|
||||||
array('name' => 'red', 'current' => true, 'url' => '#Red'),
|
array('name' => 'red', 'current' => true, 'url' => '#Red'),
|
||||||
array('name' => 'green', 'current' => false, 'url' => '#Green'),
|
array('name' => 'green', 'current' => false, 'url' => '#Green'),
|
||||||
array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
|
array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
|
||||||
);
|
);
|
||||||
|
|
||||||
public function isLink() {
|
public function isLink() {
|
||||||
// Exploit the fact that the current iteration item is at the top of the context stack.
|
// Exploit the fact that the current iteration item is at the top of the context stack.
|
||||||
return $this->getVariable('current', $this->context) != true;
|
return $this->getVariable('current', $this->context) != true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function notEmpty() {
|
public function notEmpty() {
|
||||||
return !($this->isEmpty());
|
return !($this->isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isEmpty() {
|
public function isEmpty() {
|
||||||
return count($this->item) === 0;
|
return count($this->item) === 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
class Delimiters extends Mustache {
|
class Delimiters extends Mustache {
|
||||||
public $start = "It worked the first time.";
|
public $start = "It worked the first time.";
|
||||||
|
|
||||||
public function middle() {
|
public function middle() {
|
||||||
return array(
|
return array(
|
||||||
array('item' => "And it worked the second time."),
|
array('item' => "And it worked the second time."),
|
||||||
array('item' => "As well as the third."),
|
array('item' => "As well as the third."),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public $final = "Then, surprisingly, it worked the final time.";
|
public $final = "Then, surprisingly, it worked the final time.";
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ class DoubleSection extends Mustache {
|
|||||||
public function t() {
|
public function t() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public $two = "second";
|
public $two = "second";
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
class Sections extends Mustache {
|
class Sections extends Mustache {
|
||||||
public $start = "It worked the first time.";
|
public $start = "It worked the first time.";
|
||||||
|
|
||||||
public function middle() {
|
public function middle() {
|
||||||
return array(
|
return array(
|
||||||
array('item' => "And it worked the second time."),
|
array('item' => "And it worked the second time."),
|
||||||
array('item' => "As well as the third."),
|
array('item' => "As well as the third."),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public $final = "Then, surprisingly, it worked the final time.";
|
public $final = "Then, surprisingly, it worked the final time.";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user