vscode-svg icon indicating copy to clipboard operation
vscode-svg copied to clipboard

Pretty SVG strips out ID tags

Open TillCity opened this issue 5 years ago • 1 comments

In the first place thank you very much for this VSCode extension. It really is very useful. I have run into one issue which I find rather bothersome. When you run raw SVG markup through Pretty SVG the process strips out the ID tag. I use my SVGs inline in HTML documents and need to manipulate the image elements by accessing them via the ID tag. I imagine I will not be the only one doing this. Could you either stop this from happening or else provide flags to control just what gets removed when Pretty SVG is run?

TillCity avatar Mar 21 '19 13:03 TillCity

Pretty SVG is a Parameter fixed Command, You can use the standard Formatting command, which has a plug-in setting(svg.format.plugins) that corresponds directly to SVGO, and you can cancel the cleanup ID by adding a 'cleanupIDs:false' property to the setting.

lishu avatar Mar 22 '19 00:03 lishu