From 8360f4ad81ccae37df50c613e22be201d804615a Mon Sep 17 00:00:00 2001 From: Kiliman Date: Tue, 23 Jul 2019 15:13:51 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20profile=20parsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 249c618..bca04cf 100644 --- a/index.js +++ b/index.js @@ -87,7 +87,7 @@ const getProfiles = () => { const content = fs.readFileSync(profilePath, 'utf-8'); content .split(os.EOL) - .filter(line => /^#/.test(line) === false || line.length > 0) + .filter(line => /^[#]/.test(line) === false && line.length > 0) .forEach(line => { const ch = line.trim()[0]; if (ch === '[') { @@ -102,6 +102,7 @@ const getProfiles = () => { profiles.push(profile); } else { if (!profile) { + console.log(`Found ${ch} instead of [`); throw new Error('You must profile a profile name in []'); } profile.ligatures.push(line);