From b9905aa5ec467e6e4e62fb501fc8508338d6841b Mon Sep 17 00:00:00 2001 From: Michael Irigoyen Date: Sat, 13 Jul 2019 15:25:21 -0400 Subject: [PATCH] (Fix #800) Add option to the mergePaths plugin, forcing all path attributes to be combined (#1084) Add option to the mergePaths plugin, forcing all path attributes to be combined --- plugins/mergePaths.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/mergePaths.js b/plugins/mergePaths.js index 066b3f2e..9d3c570d 100644 --- a/plugins/mergePaths.js +++ b/plugins/mergePaths.js @@ -8,6 +8,7 @@ exports.description = 'merges multiple paths in one if possible'; exports.params = { collapseRepeated: true, + force: false, leadingZero: true, negativeExtraSpace: true, noSpaceAfterFlags: true @@ -57,7 +58,7 @@ exports.fn = function(item, params) { prevPathJS = path2js(prevContentItem), curPathJS = path2js(contentItem); - if (equalData && !intersects(prevPathJS, curPathJS)) { + if (params.force || equalData && !intersects(prevPathJS, curPathJS)) { js2path(prevContentItem, prevPathJS.concat(curPathJS), params); return false; }