Skip to content

Commit 06ea34b

Browse files
committed
Only replace 0. with . at the begin of a size value.
1 parent 90c21c9 commit 06ea34b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sabberworm/CSS/Value/Size.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function isRelative() {
6161

6262
public function __toString() {
6363
$l = localeconv();
64-
return str_replace(array($l['decimal_point'], '0.'), '.', $this->fSize) . ($this->sUnit === null ? '' : $this->sUnit);
64+
return preg_replace(array('/' . $l['decimal_point'] . '/', '/^0./'), '.', $this->fSize) . ($this->sUnit === null ? '' : $this->sUnit);
6565
}
6666

6767
}

0 commit comments

Comments
 (0)