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

Fix multiple prefixes in multipass #1168

Closed
wants to merge 1 commit into from

Conversation

strarsis
Copy link
Contributor

imagemin-svgo enables svgo multipass by default, hence many users reports this issue (#1148).

This PR will add a flag to the internal svgo AST for each node processed by the prefixIds plugin to prevent multiple prefixing, which currently happens in multipass mode.

(Originally the prefixIds plugin should check the beginning of each name and skip if it equals the prefix, but there can be occasions where the prefix is the same as a non-prefixed name, and this can result in collisions between SVGs because of skipped prefixing.)

@strarsis
Copy link
Contributor Author

strarsis commented Oct 29, 2019

Retracting this PR in favour of a better solution that adds multipassCount to
the info object that is passed to each plugin: #1173

@strarsis strarsis closed this Oct 29, 2019
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.

None yet

1 participant