johnkenny54
e2575988cc
fix: <a> element not parsed as text ( #1959 )
2024-02-11 22:14:25 +00:00
Jon Dufresne
2442f74239
chore: convert project to us ECMAScript modules (preserving CJS compatibility) ( #1905 )
2024-01-03 16:17:37 +00:00
Seth Falco
07c09199ed
fix: remove hrefs for unconventional namespaces ( #1820 )
2023-11-04 15:17:15 +00:00
Seth Falco
e21e56060b
feat(removeScriptElement): add all known event types ( #1819 )
...
Update the list of event attributes to include everything listed on MDN.
2023-11-04 14:07:29 +00:00
Seth Falco
e73ee2de96
fix(removeScriptElement): collapse a tag propertly ( #1818 )
2023-11-04 13:42:07 +00:00
Seth Falco
a880505859
fix(removeScriptElement): remove link anchors with scripts ( #1807 )
2023-10-29 14:46:55 +00:00
Bogdan Chadkin
e2e65cfc1e
Move plugin types into d.ts
2022-11-11 12:19:38 +03:00
Bogdan Chadkin
e6bd703b0a
Remove unused active and type fields from plugins
2022-10-08 23:39:58 +03:00
Bogdan Chadkin
9b8f13e911
Add plugin types ( #1527 )
...
Covered following plugins
- addAttributesToSVGElement.js
- addClassesToSVGElement.js
- cleanupAttrs.js
- convertEllipseToCircle.js
- removeAttributesBySelector.js
- removeAttrs.js
- removeComments.js
- removeDesc.js
- removeDoctype.js
- removeElementsByAttr.js
- removeEmptyText.js
- removeMetadata.js
- removeRasterImages.js
- removeScriptElement.js
- removeStyleElement.js
- removeTitle.js
- removeXMLProcInst.js
2021-08-15 13:52:41 +03:00
Bogdan Chadkin
07f8d606e0
Implement preset-default plugin ( #1513 )
...
I saw complaints about `extendDefaultPlugins` api
- it cannot be used when svgo is installed globally
- it requires svgo to be installed when using svgo-loader or svgo-jsx
- it prevents using serializable config formats like json
In this diff I introduced the new plugin which is a bundle of all
default plugins.
```js
module.exports = {
plugins: [
'preset_default',
// or
{
name: 'preset_default',
floatPrecision: 4,
overrides: {
convertPathData: {
applyTransforms: false
}
}
}
]
}
```
2021-08-13 19:07:08 +03:00
Bogdan Chadkin
f00bd727b0
Refactor basic plugins with visitor api ( #1518 )
...
- cleanupAttrs
- convertEllipseToCircle
- removeDesc
- removeDoctype
- removeEmptyText
- removeMetadata
- removeRasterImages
- removeScriptElement
- removeStyleElement
- removeTitle
- removeXMLProcInst
2021-08-12 14:57:36 +03:00
Bogdan Chadkin
00ec0f71fe
Format all plugins with prettier
2021-03-09 19:58:00 +03:00
Bogdan Chadkin
9263d9ab90
Fix svg spec urls in plugins
2021-02-24 11:18:48 +03:00
Patrick Klingemann
9f05ac814b
add removeScriptElement plugin
2017-03-23 12:45:21 -04:00