1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

Parse commas in viewBox

This commit is contained in:
GreLI
2017-03-25 22:06:15 +03:00
parent 0bc82faaf8
commit faabeff4f4
2 changed files with 10 additions and 1 deletions

View File

@ -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'];
/**