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

Correct documentation of cleanupIDs #1745

Closed
wants to merge 1 commit into from

Conversation

GeorgeTaveras1231
Copy link

Basing this documentation clean up on the fact that referencing the plugin via cleanupIds doesn't work but cleanupIDs does work

This doesn't work

svgo.optimize(source, {
    path: dirname,
    plugins: [
      {
        name: 'preset-default',
        params: {
          overrides: {
            cleanupIds: {
              minify: false,
            },
          },
        },
      },
    ],
  });

This works

svgo.optimize(source, {
    path: dirname,
    plugins: [
      {
        name: 'preset-default',
        params: {
          overrides: {
            cleanupIDs: {
              minify: false,
            },
          },
        },
      },
    ],
  });

Basing this documentation clean up on the fact that referencing the plugin via `cleanupIds` doesn't work but `cleanupIDs` does work


### This doesn't work
```js
svgo.optimize(source, {
    path: dirname,
    plugins: [
      {
        name: 'preset-default',
        params: {
          overrides: {
            cleanupIds: {
              minify: false,
            },
          },
        },
      },
    ],
  });
```

### This works
```js
svgo.optimize(source, {
    path: dirname,
    plugins: [
      {
        name: 'preset-default',
        params: {
          overrides: {
            cleanupIDs: {
              minify: false,
            },
          },
        },
      },
    ],
  });
```
@ADTC
Copy link
Contributor

ADTC commented Feb 15, 2023

Should I integrate this fix in my PR #1731 @TrySound @deepsweet ?

@ADTC
Copy link
Contributor

ADTC commented Feb 15, 2023

@GeorgeTaveras1231 are you sure about this btw? Searching the code, I can only find cleanupIds.

@GeorgeTaveras1231
Copy link
Author

@ADTC I've looked further into it and it seems I ran into this problem because I was using an older version of SVGO. I was using v2.8.0, and the documentation in that git tag seems to be correct. Sorry for that miss 😅 . I will go ahead and close this.

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.

2 participants