Automattic\WooCommerce\EmailEditorVendor\Sabberworm\CSS\Parsing
ParserState::consumeWhiteSpace
Метод класса: ParserState{}
Хуков нет.
Возвращает
array<int, Comment>|void.
Использование
$ParserState = new ParserState(); $ParserState->consumeWhiteSpace();
Код ParserState::consumeWhiteSpace() ParserState::consumeWhiteSpace WC 11.3.0
public function consumeWhiteSpace()
{
$aComments = [];
do {
while (preg_match('/\\s/isSu', $this->peek()) === 1) {
$this->consume(1);
}
if ($this->oParserSettings->bLenientParsing) {
try {
$oComment = $this->consumeComment();
} catch (UnexpectedEOFException $e) {
$this->iCurrentPosition = $this->iLength;
return $aComments;
}
} else {
$oComment = $this->consumeComment();
}
if ($oComment !== false) {
$aComments[] = $oComment;
}
} while ($oComment !== false);
return $aComments;
}