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:
@ -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'];
|
||||
|
||||
/**
|
||||
|
9
test/plugins/removeViewBox.03.svg
Normal file
9
test/plugins/removeViewBox.03.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="50" viewBox="0, 0, 100, 50">
|
||||
test
|
||||
</svg>
|
||||
|
||||
@@@
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="50">
|
||||
test
|
||||
</svg>
|
After Width: | Height: | Size: 192 B |
Reference in New Issue
Block a user