Skip to content

Commit

Permalink
strip ( and ) when downloading images (#3182)
Browse files Browse the repository at this point in the history
* strip ( and ) when downloading images

* eslint fix
  • Loading branch information
peterbe authored Mar 10, 2021
1 parent 7f049b7 commit 90cc798
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/flaws.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 90cc798

Please sign in to comment.