ben-eb/gulp-svgmin

Should elements be merged and classes preserved?

ronmurp opened this issue · 1 comments

Comparing gulp-svgmin with grunt-svgmin, Expected a and enclosed to be merged into a with both classes, as in grunt-svgmin@3.3.0 example.

Original:
<svg> <g class="cls-abc"> <rect class="cls-def" x="50" y="20" width="150" height="150" /> </g> </svg>

grunt-svgmin@3.3.0 merges g & rect into a path and combines class values
<svg> <path class="cls-abc cls-def" d="M50 20h150v150H50z"/> </svg>

gulp-svgmin@3.0.0 & grunt-svgmin@6.0.1 leave the g & rect unmerged
<svg> <g class="cls-abc"> <path class="cls-def" d="M50 20h150v150H50z"/> </g> </svg>

This issue was observed on larger project files, converting a legacy grunt project to a gulp project. The test sample above was used to illustrate the issue.

Hey @ronmurp, please could you report this to https://github.com/svg/svgo if you are still having this issue? This plugin is a thin wrapper on top of svgo to use it with gulp, and so this is better reported upstream. Thanks. 👍