Skip to content

Commit 7ac198d

Browse files
committed
Remove another current call
1 parent f7a954d commit 7ac198d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/HTML5/Parser/Tokenizer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ protected function consumeData()
124124
// Character reference
125125
$this->characterReference();
126126

127+
$tok = $this->scanner->current();
128+
127129
// Parse tag
128-
if ($this->scanner->current() === '<') {
130+
if ($tok === '<') {
129131
// Any buffered text data can go out now.
130132
$this->flushBuffer();
131133

@@ -138,10 +140,11 @@ protected function consumeData()
138140
// This always returns false.
139141
|| $this->parseError("Illegal tag opening")
140142
|| $this->characterData();
143+
144+
$tok = $this->scanner->current();
141145
}
142146

143147
// Handle end of document
144-
$tok = $this->scanner->current();
145148
$this->eof($tok);
146149

147150
// Parse character

0 commit comments

Comments
 (0)