From 90cc798ef603a0ce01e70b731b1781332d1dc1d7 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Wed, 10 Mar 2021 10:30:33 -0500 Subject: [PATCH] strip ( and ) when downloading images (#3182) * strip ( and ) when downloading images * eslint fix --- build/flaws.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/flaws.js b/build/flaws.js index 5b449558cd77..a10ccdbd9e5b 100644 --- a/build/flaws.js +++ b/build/flaws.js @@ -632,6 +632,9 @@ async function fixFixableFlaws(doc, options, document) { Document.getFolderPath(document.metadata), path .basename(imageBasename) + // Names like `screenshot-(1).png` are annoying because the `(` often + // has to be escaped when working on the command line. + .replace(/[()]/g, "") .replace(/\s+/g, "_") // From legacy we have a lot of images that are named like // `/@api/deki/files/247/=HTMLBlinkElement.gif` for example.