Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

SVG rect broken #1

Closed
rondonjon opened this issue Jul 6, 2015 · 2 comments
Closed

SVG rect broken #1

rondonjon opened this issue Jul 6, 2015 · 2 comments

Comments

@rondonjon
Copy link
Contributor

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
Copy link
Contributor Author

Do you think you could restrict the RegExp's to SVG tags only?

@sairion
Copy link
Collaborator

sairion commented Jul 7, 2015

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.

@sairion sairion mentioned this issue Jul 7, 2015
@sairion sairion closed this as completed in #2 Jul 7, 2015
sairion pushed a commit that referenced this issue Dec 15, 2016
multiple classes in class string, fix for Issue #39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants