Skip to content

Commit

Permalink
Allow - in filenames - HashLips#1508
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Oct 1, 2023
1 parent da000ba commit 4326a22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const ctx = canvas.getContext("2d");
ctx.imageSmoothingEnabled = format.smoothing;
const iconCanvas = createCanvas(iconFormat.width, iconFormat.height);
const iconCtx = iconCanvas.getContext("2d");
const DNA_DELIMITER = "-";
const DNA_DELIMITER = "\n";
var metadataList = [];
var attributesList = [];
var dnaList = new Set();
Expand Down Expand Up @@ -86,8 +86,8 @@ const getElements = (path) => {
.readdirSync(path)
.filter((item) => !/(^|\/)\.[^\/\.]/g.test(item))
.map((i, index) => {
if (i.includes("-")) {
throw new Error(`layer name can not contain dashes, please fix: ${i}`);
if (i.includes(DNA_DELIMITER)) {
throw new Error(`layer name can not contain ${DNA_DELIMITER}, please fix: ${i}`);
}
return {
id: index,
Expand Down

0 comments on commit 4326a22

Please sign in to comment.