changed the way how images are rendered as strings

This commit is contained in:
Marc Satkowski 2025-04-05 22:44:20 +02:00
parent 4f9d04200e
commit 31918eb5f6
2 changed files with 3 additions and 9 deletions

View file

@ -93,7 +93,7 @@ export class CheckboxParser implements CellFunction<Args> {
renderAsString(values: Args): string {
if (!isCheckboxProp(values)) {
if (!!values[0]) {
if (values[0]) {
return '[x]'
}
return '[ ]'

View file

@ -53,14 +53,8 @@ export class ImageParser implements CellFunction<Args> {
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()
}
}
}