Browse Source

Remove unnecessary breaks in Tokenizer

split-manual
Dustin Wilson 6 years ago
parent
commit
2f0426946f
  1. 5
      lib/Tokenizer.php

5
lib/Tokenizer.php

@ -4,7 +4,7 @@ namespace dW\HTML5;
class Tokenizer { class Tokenizer {
public $state; public $state;
protected $data; protected $data;
protected $stack; protected $stack;
@ -3105,18 +3105,15 @@ class Tokenizer {
if ($peek === ']]>') { if ($peek === ']]>') {
$this->data->consume(3); $this->data->consume(3);
return new CharacterToken($char); return new CharacterToken($char);
break;
} elseif ($peek === '') { } elseif ($peek === '') {
# If the end of the file was reached, reconsume the EOF character. # If the end of the file was reached, reconsume the EOF character.
$this->data->unconsume(); $this->data->unconsume();
return new CharacterToken($char); return new CharacterToken($char);
break;
} elseif ($peeklen < 3) { } elseif ($peeklen < 3) {
$char .= $this->data->consume($peeklen); $char .= $this->data->consume($peeklen);
# If the end of the file was reached, reconsume the EOF character. # If the end of the file was reached, reconsume the EOF character.
$this->data->unconsume(); $this->data->unconsume();
return new CharacterToken($char); return new CharacterToken($char);
break;
} else { } else {
$char .= $this->data->consume(); $char .= $this->data->consume();
} }

Loading…
Cancel
Save