Skip to content

Commit 468da34

Browse files
pierlonwestonruter
andcommitted
Match percent symbol or alphanumeric text
Co-authored-by: Weston Ruter <[email protected]>
1 parent 3e9732d commit 468da34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sabberworm/CSS/Value/Size.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function parse(ParserState $oParserState, $bIsColorComponent = fal
4141
$aSizeUnits = self::getSizeUnits();
4242
$iMaxSizeUnitLength = max(array_keys($aSizeUnits));
4343

44-
if ( preg_match( '/^[a-zA-Z0-9%]+/', $oParserState->peek($iMaxSizeUnitLength), $matches ) ) {
44+
if ( preg_match( '/^(%|[a-zA-Z0-9]+)/', $oParserState->peek($iMaxSizeUnitLength), $matches ) ) {
4545
$sUnit = strtolower($matches[0]);
4646
$iUnitLength = strlen($sUnit);
4747

0 commit comments

Comments
 (0)