svg/svgo — pull request #246 by bradcerasani (2014-09-07 21:57:35+00:00)
Title: Prevented removeUselessStrokeAndFill from removing non-default fill-rule

The current `removeUselessStrokeAndFill` plugin removes any `fill-rule` if `fill` is set to none or `fill-opacity` is set to 0. Nested paths require `fill-rule` to determine whether or not they should render inside a shape - this is why svgo has previously broken/collapsed some images, especially those assembled with [boolean operations](http://bohemiancoding.com/sketch/support/documentation/04-shapes/2-boolean-operations.html).

This PR checks if the current attr up for removal is `fill-rule`, and if so, whether or not its value differs from the default `nonzero`; if it does, it leaves it intact.

This should fix the following issues: [#151](https://github.com/svg/svgo/issues/151), [#161](https://github.com/svg/svgo/issues/161), [#191](https://github.com/svg/svgo/issues/191), [#201](https://github.com/svg/svgo/issues/201), [#217](https://github.com/svg/svgo/issues/217)

Updated tests to verify `fill-rule="evenodd"` does not get removed by svgo, as it is a [non-default value](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule).