Skip to content

Commit

Permalink
#126 incorrectly parsing selector when '~' is used
Browse files Browse the repository at this point in the history
  • Loading branch information
tbela99 committed Jul 14, 2022
1 parent a6553cb commit fd83f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TBela/CSS/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -1196,10 +1196,10 @@ public static function getTokens(string $string, $capture_whitespace = true, $co
$tokens[] = (object)['type' => $context === 'attribute' ? 'operator' : 'css-string', 'value' => '='];
} else if ($context === 'attribute') {

$tokens[] = (object)['type' => 'operator', 'value' => $string[$i++] . '='];
$tokens[] = (object)['type' => 'operator', 'value' => $string[$i++] .$string[$i]];
} else {

$tokens[] = (object)['type' => 'css-string', 'value' => $string[$i++]];
$tokens[] = (object)['type' => 'css-string', 'value' => $string[$i]];
}

break;
Expand Down

0 comments on commit fd83f44

Please sign in to comment.