Automattic\WooCommerce\Vendor\Sabberworm\CSS\Parsing
ParserState::consumeWhiteSpace
Method of the class: ParserState{}
No Hooks.
Returns
Array
Usage
$ParserState = new ParserState(); $ParserState->consumeWhiteSpace();
ParserState::consumeWhiteSpace() ParserState::consumeWhiteSpace code WC 10.5.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;
}