From 4326a22c4f0ad0b1bf97dfaad224d071ee69fb42 Mon Sep 17 00:00:00 2001 From: quest Date: Sat, 30 Sep 2023 15:50:41 -1000 Subject: [PATCH] Allow - in filenames - https://github.com/HashLips/hashlips_art_engine/pull/1508 --- src/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 80d5df413..3976ea86a 100644 --- a/src/main.js +++ b/src/main.js @@ -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(); @@ -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,