Skip to content

Commit

Permalink
Trim polygon points attribute when parsing (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptsavdar authored and meyfa committed Feb 6, 2017
1 parent d002cd2 commit 84339ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nodes/Shapes/SVGPolygonalShape.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function constructFromAttributes($attrs)
$points = array();

if (isset($attrs['points'])) {
$coords = preg_split('/[\s,]+/', $attrs['points']);
$coords = preg_split('/[\s,]+/', trim($attrs['points']));
for ($i = 0, $n = count($coords); $i < $n; $i += 2) {
$points[] = array(
floatval($coords[$i]),
Expand Down

0 comments on commit 84339ea

Please sign in to comment.