Skip to content

Commit

Permalink
Parse commas in viewBox
Browse files Browse the repository at this point in the history
  • Loading branch information
GreLI committed Mar 25, 2017
1 parent 0bc82fa commit faabeff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/removeViewBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports.active = false;

exports.description = 'removes viewBox attribute when possible (disabled by default)';

var regViewBox = /^0\s0\s([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)\s([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)$/,
var regViewBox = /^0\s*[,\s]\s*0\s*[,\s]\s*([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)\s*[,\s]\s*([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)$/,
viewBoxElems = ['svg', 'pattern'];

/**
Expand Down
9 changes: 9 additions & 0 deletions test/plugins/removeViewBox.03.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit faabeff

Please sign in to comment.