🐛 Fix profile parsing

This commit is contained in:
Kiliman
2019-07-23 15:13:51 -04:00
committed by unknown
parent 73f188856f
commit 8360f4ad81
+2 -1
View File
@@ -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);