mirror of
https://github.com/kiliman/operator-mono-lig.git
synced 2026-08-12 02:10:52 +02:00
🐛 Fix profile parsing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user