mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Remove T_INVERTED form Template.php
This commit is contained in:
parent
bdc3643544
commit
973dfff34a
@ -110,11 +110,11 @@ class Handlebars_Template
|
||||
$index++;
|
||||
switch ($current[Handlebars_Tokenizer::TYPE]) {
|
||||
case Handlebars_Tokenizer::T_SECTION :
|
||||
array_push($this->_stack, array(0, $current[Handlebars_Tokenizer::NODES]));
|
||||
$newStack = isset($current[Handlebars_Tokenizer::NODES]) ? $current[Handlebars_Tokenizer::NODES] : array();
|
||||
array_push($this->_stack, array(0, $newStack));
|
||||
$buffer .= $this->_section($context, $current);
|
||||
array_pop($this->_stack);
|
||||
break;
|
||||
case Handlebars_Tokenizer::T_INVERTED : //TODO: This has no effect, remove the whole ^ thing!
|
||||
case Handlebars_Tokenizer::T_COMMENT :
|
||||
$buffer .= '';
|
||||
break;
|
||||
@ -152,11 +152,15 @@ class Handlebars_Template
|
||||
$helpers = $this->handlebars->getHelpers();
|
||||
$sectionName = $current[Handlebars_Tokenizer::NAME];
|
||||
if ($helpers->has($sectionName)) {
|
||||
$source = substr(
|
||||
$this->getSource(),
|
||||
$current[Handlebars_Tokenizer::INDEX],
|
||||
$current[Handlebars_Tokenizer::END] - $current[Handlebars_Tokenizer::INDEX]
|
||||
);
|
||||
if (isset($current[Handlebars_Tokenizer::END])) {
|
||||
$source = substr(
|
||||
$this->getSource(),
|
||||
$current[Handlebars_Tokenizer::INDEX],
|
||||
$current[Handlebars_Tokenizer::END] - $current[Handlebars_Tokenizer::INDEX]
|
||||
);
|
||||
} else {
|
||||
$source = '';
|
||||
}
|
||||
$params = array(
|
||||
$this, //First argument is this template
|
||||
$context, //Secound is current context
|
||||
|
Loading…
Reference in New Issue
Block a user