Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addClassesToSVGElement: avoid repeating classnames #529

Merged
merged 1 commit into from
Aug 25, 2016

Conversation

ricardobeat
Copy link
Contributor

If you run svgo repeatedly over a set of files it will continue to add the same class over and over:

plugins:
  - addClassesToSVGElement:
     className: icon
<svg class="icon icon icon icon icon">...

This commit changes addClassesToSVGElement to only add classes that are not already present.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.474% when pulling dd8e385 on ricardobeat:addClassesNoRepeat into b35d828 on svg:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.474% when pulling dd8e385 on ricardobeat:addClassesNoRepeat into b35d828 on svg:master.

@GreLI GreLI merged commit 517449f into svg:master Aug 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants