Skip to content

Commit

Permalink
fix(mergePaths): use a default floatPrecision (#1945)
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow authored Feb 7, 2024
1 parent c787b9f commit 9a7750f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/03-plugins/merge-paths.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ svgo:
default: false
floatPrecision:
description: Number of decimal places to round to, using conventional rounding rules.
default: null
default: 3
noSpaceAfterFlags:
description: If to omit spaces after flags. Flags are values that can only be <code>0</code> or <code>1</code> and are used by some path commands, namely <a href="https://developer.mozilla.org/docs/Web/SVG/Attribute/d#elliptical_arc_curve" target="_blank"><code>A</code> and <code>a</code></a>.
default: false
Expand Down
2 changes: 1 addition & 1 deletion plugins/mergePaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const description = 'merges multiple paths in one if possible';
export const fn = (root, params) => {
const {
force = false,
floatPrecision,
floatPrecision = 3,
noSpaceAfterFlags = false, // a20 60 45 0 1 30 20 → a20 60 45 0130 20
} = params;
const stylesheet = collectStylesheet(root);
Expand Down

0 comments on commit 9a7750f

Please sign in to comment.