Strict comparison in Tokenizer
This commit is contained in:
@@ -116,7 +116,7 @@ class Mustache_Tokenizer
|
|||||||
} else {
|
} else {
|
||||||
$char = $text[$i];
|
$char = $text[$i];
|
||||||
$this->buffer .= $char;
|
$this->buffer .= $char;
|
||||||
if ($char == "\n") {
|
if ($char === "\n") {
|
||||||
$this->flushBuffer();
|
$this->flushBuffer();
|
||||||
$this->line++;
|
$this->line++;
|
||||||
}
|
}
|
||||||
@@ -157,14 +157,14 @@ class Mustache_Tokenizer
|
|||||||
self::OTAG => $this->otag,
|
self::OTAG => $this->otag,
|
||||||
self::CTAG => $this->ctag,
|
self::CTAG => $this->ctag,
|
||||||
self::LINE => $this->line,
|
self::LINE => $this->line,
|
||||||
self::INDEX => ($this->tagType == self::T_END_SECTION) ? $this->seenTag - $this->otagLen : $i + $this->ctagLen
|
self::INDEX => ($this->tagType === self::T_END_SECTION) ? $this->seenTag - $this->otagLen : $i + $this->ctagLen
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->buffer = '';
|
$this->buffer = '';
|
||||||
$i += $this->ctagLen - 1;
|
$i += $this->ctagLen - 1;
|
||||||
$this->state = self::IN_TEXT;
|
$this->state = self::IN_TEXT;
|
||||||
if ($this->tagType == self::T_UNESCAPED) {
|
if ($this->tagType === self::T_UNESCAPED) {
|
||||||
if ($this->ctag == '}}') {
|
if ($this->ctag === '}}') {
|
||||||
$i++;
|
$i++;
|
||||||
} else {
|
} else {
|
||||||
// Clean up `{{{ tripleStache }}}` style tokens.
|
// Clean up `{{{ tripleStache }}}` style tokens.
|
||||||
|
|||||||
Reference in New Issue
Block a user