SVG rect broken
rondonjon opened this issue · 2 comments
rondonjon commented
The following RegExp breaks <rect>
tags because it removes their width
and height
attributes!
.replace(/width="\d+(\.\d+)?(px)?"/gi, "")
.replace(/height="\d+(\.\d+)?(px)?"/gi, "")
rondonjon commented
Do you think you could restrict the RegExp's to SVG tags only?
sairion commented
Thanks for the report. I've never thought about it (usually I use this to remove useless crust from SVGs generated by Sketch and Photoshop, which is usually <svg />
containing a single <g />
node) but it should be done. ;) I will look into that.