Fixes #149: vim mode
This commit is contained in:
Zef Hemel
2022-12-15 14:40:39 +01:00
committed by GitHub
parent d609daf59e
commit 3dd0d5bf64
8 changed files with 45 additions and 10 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ export {
export type { NodeType, SyntaxNode, SyntaxNodeRef, Tree } from "@lezer/common";
export { searchKeymap } from "https://esm.sh/@codemirror/search@6.2.3?external=@codemirror/state,@codemirror/view";
export { searchKeymap } from "@codemirror/search";
export {
Decoration,
drawSelection,
+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 {};
}
}