Skip to content

Commit 361036a

Browse files
committed
handle Unicode strings correctly
1 parent c779825 commit 361036a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CSSParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ private function consume($mValue = 1) {
363363

364364
private function consumeExpression($mExpression) {
365365
$aMatches;
366-
if(preg_match($mExpression, $this->inputLeft(), $aMatches) === 1) {
367-
if($aMatches[0][1] === $this->iCurrentPosition) {
366+
if(preg_match($mExpression, $this->inputLeft(), $aMatches, PREG_OFFSET_CAPTURE) === 1) {
367+
if($aMatches[0][1] === 0) {
368368
return $this->consume($aMatches[0][0]);
369369
}
370370
}

0 commit comments

Comments
 (0)