diff --git a/src/cellParser/parser/checkbox.ts b/src/cellParser/parser/checkbox.ts index 61fcfd9..b46f438 100644 --- a/src/cellParser/parser/checkbox.ts +++ b/src/cellParser/parser/checkbox.ts @@ -93,7 +93,7 @@ export class CheckboxParser implements CellFunction { renderAsString(values: Args): string { if (!isCheckboxProp(values)) { - if (!!values[0]) { + if (values[0]) { return '[x]' } return '[ ]' diff --git a/src/cellParser/parser/image.ts b/src/cellParser/parser/image.ts index e201864..5bbf0b7 100644 --- a/src/cellParser/parser/image.ts +++ b/src/cellParser/parser/image.ts @@ -53,14 +53,8 @@ export class ImageParser implements CellFunction { renderAsString([href, path]: Args): string { if (!isLinkLocal(href)) { return `![](${href})` + } else { + return `![[${href}]]` } - - try { - const resourcePath = this.getResourcePath(href, path) - return `![[${resourcePath}]]` - } catch (e) { - return e.toString() - } - } } \ No newline at end of file