8000 Catch negative values too. · gardenofconcepts/PHP-CSS-Parser@a8bd3a6 · GitHub
Skip to content
8000

Commit a8bd3a6

Browse files
committed
Catch negative values too.
1 parent 3519d93 commit a8bd3a6

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 preg_replace(array('/' . preg_quote($l['decimal_point'], '/') . '/', '/^0\./'), '.', $this->fSize) . ($this->sUnit === null ? '' : $this->sUnit);
64+
return preg_replace(array('/' . preg_quote($l['decimal_point'], '/') . '/', '/^(-?)0\./'), '$1.', $this->fSize) . ($this->sUnit === null ? '' : $this->sUnit);
6565
}
6666

6767
}

0 commit comments

Comments
 (0)