diff --git a/packages/view/src/Parser/TempestViewLexer.php b/packages/view/src/Parser/TempestViewLexer.php index 36750baae..83ee0ff78 100644 --- a/packages/view/src/Parser/TempestViewLexer.php +++ b/packages/view/src/Parser/TempestViewLexer.php @@ -24,17 +24,17 @@ public function lex(): TokenCollection $tokens = []; while ($this->current !== null) { - if ($this->comesNext('comesNext('lexXml(); - } elseif ($this->comesNext('comesNext('lexPhp(); - } elseif ($this->comesNext('' && $this->current !== null) { + while (! $this->comesNext('-->', 3) && $this->current !== null) { $buffer .= $this->consume(); } @@ -264,7 +296,7 @@ private function lexCharacterData(): array $contentLine = $this->line; - while ($this->seek(3) !== ']]>' && $this->current !== null) { + while (! $this->comesNext(']]>', 3) && $this->current !== null) { $buffer .= $this->consume(); }