Fixes #149: vim mode

This commit is contained in:
Zef Hemel
2022-12-15 13:23:49 +01:00
parent d609daf59e
commit 0f090b77db
7 changed files with 40 additions and 10 deletions
+8 -3
View File
@@ -33,7 +33,12 @@ export function parseYamlSettings(settingsMarkdown: string): {
return {};
}
const yaml = match[1];
return YAML.parse(yaml) as {
[key: string]: any;
};
try {
return YAML.parse(yaml) as {
[key: string]: any;
};
} catch (e: any) {
console.error("Error parsing SETTINGS as YAML", e.message);
return {};
}
}