Skip to content

Commit

Permalink
fix: handle replacing multiple spaces and slashes within a story name
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie authored and chrisvxd committed May 31, 2019
1 parent 043054a commit 9b58e3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/Story2sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ export default class Story2sketch {
layers: this.positionSymbols(this.symbolsByGrouping[grouping])
};
const filename = `${grouping
.replace(" ", "_")
.replace("/", "+")}.asketch.json`;
.replace(/ /g, "_")
.replace(/\//g, "+")}.asketch.json`;

const outputPath = path.join(this.output, filename);

Expand Down

0 comments on commit 9b58e3d

Please sign in to comment.