You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug cleanupAttrs to ignore spacing from svgs
The below config isnt working
exportdefault{plugins: [{name: 'preset-default',params: {overrides: {// disable a default pluginremoveViewBox: false,cleanupAttrs: false,// added this to base config// customize the params of a default plugininlineStyles: {onlyMatchedOnce: false,},// tried the below config too// also tried switching cleanupAttrs: false and thiscleanupAttrs: {spaces: false}},},},],};
To Reproduce
Steps to reproduce the behavior:
I tried the below code in the svgo playground as well
constsvg=`<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox=" 0 0 150 100 " width="150"> <!-- Created with love! --> <defs> <ellipse cx="50" cy="50.0" rx="50.00" ry="auto" fill="black" id="circle"/> </defs> <g> <use href="#circle" transform="skewX(16)"/> <rect id="useless" width="0" height="0" fill="#ff0000"/> </g></svg>`;constsvgoConfig={js2svg: {indent: 2,pretty: true},plugins: [{name: 'preset-default',params: {overrides: {// disable a default pluginremoveViewBox: false,// customize the params of a default plugininlineStyles: {onlyMatchedOnce: false,},cleanupAttrs: {spaces: false}},},}]}render(<SvgoPreviewsvg={svg}svgoConfig={svgoConfig}/>);
Describe the bug
cleanupAttrs
to ignore spacing from svgsThe below config isnt working
To Reproduce
Steps to reproduce the behavior:
I tried the below code in the svgo playground as well
If I remove preset-default and use as base plugin, it works as expected.
Expected behavior
'preset-default' should be configurable as mentioned
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: