From 8d05ade28b7be7c99555598fec22526c1bff603d Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Sun, 1 Oct 2023 12:56:27 +0100 Subject: [PATCH] fix(removeDesc): removeAny should be disabled by default --- lib/svgo-node.test.js | 12 ++++++------ lib/svgo.test.js | 19 ++++++++----------- plugins/removeDesc.js | 2 +- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/svgo-node.test.js b/lib/svgo-node.test.js index 2f0d077b5..76972e7bc 100644 --- a/lib/svgo-node.test.js +++ b/lib/svgo-node.test.js @@ -17,7 +17,7 @@ describeLF('with LF line-endings', () => { - Not standard description + Created with love @@ -34,7 +34,7 @@ describeLF('with LF line-endings', () => { - Not standard description + Created with love @@ -53,7 +53,7 @@ describeLF('with LF line-endings', () => { - Not standard description + Created with love @@ -74,7 +74,7 @@ describeCRLF('with CRLF line-endings', () => { - Not standard description + Created with love @@ -91,7 +91,7 @@ describeCRLF('with CRLF line-endings', () => { - Not standard description + Created with love @@ -110,7 +110,7 @@ describeCRLF('with CRLF line-endings', () => { - Not standard description + Created with love diff --git a/lib/svgo.test.js b/lib/svgo.test.js index a1570b35e..4ac94b3cd 100644 --- a/lib/svgo.test.js +++ b/lib/svgo.test.js @@ -11,7 +11,7 @@ test('allow to setup default preset', () => { - Not standard description + Created with love @@ -46,7 +46,7 @@ test('allow to disable and customize plugins in preset', () => { overrides: { removeXMLProcInst: false, removeDesc: { - removeAny: false, + removeAny: true, }, }, }, @@ -57,9 +57,6 @@ test('allow to disable and customize plugins in preset', () => { expect(data).toMatchInlineSnapshot(` " - - Not standard description - " @@ -104,7 +101,7 @@ describe('allow to configure EOL', () => { - Not standard description + Created with love @@ -123,7 +120,7 @@ describe('allow to configure EOL', () => { - Not standard description + Created with love @@ -142,7 +139,7 @@ describe('allow to configure EOL', () => { - Not standard description + Created with love @@ -163,7 +160,7 @@ describe('allow to configure final newline', () => { - Not standard description + Created with love @@ -180,7 +177,7 @@ describe('allow to configure final newline', () => { - Not standard description + Created with love @@ -199,7 +196,7 @@ describe('allow to configure final newline', () => { - Not standard description + Created with love diff --git a/plugins/removeDesc.js b/plugins/removeDesc.js index 5d9e57aef..4520ed27c 100644 --- a/plugins/removeDesc.js +++ b/plugins/removeDesc.js @@ -19,7 +19,7 @@ const standardDescs = /^(Created with|Created using)/; * @type {import('./plugins-types').Plugin<'removeDesc'>} */ exports.fn = (root, params) => { - const { removeAny = true } = params; + const { removeAny = false } = params; return { element: { enter: (node, parentNode) => {