Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use newline as DNA delimiter, update error check about layer names #1508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ctx.imageSmoothingEnabled = format.smoothing;
var metadataList = [];
var attributesList = [];
var dnaList = new Set();
const DNA_DELIMITER = "-";
const DNA_DELIMITER = "\n";
const HashlipsGiffer = require(`${basePath}/modules/HashlipsGiffer.js`);

let hashlipsGiffer = null;
Expand Down Expand Up @@ -73,8 +73,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