mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 10:10:28 +00:00
changed the way how images are rendered as strings
This commit is contained in:
parent
4f9d04200e
commit
31918eb5f6
2 changed files with 3 additions and 9 deletions
|
|
@ -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 '[ ]'
|
||||
|
|
|
|||
|
|
@ -53,14 +53,8 @@ export class ImageParser implements CellFunction<Args> {
|
|||
renderAsString([href, path]: Args): string {
|
||||
if (!isLinkLocal(href)) {
|
||||
return ``
|
||||
} else {
|
||||
return `![[${href}]]`
|
||||
}
|
||||
|
||||
try {
|
||||
const resourcePath = this.getResourcePath(href, path)
|
||||
return `![[${resourcePath}]]`
|
||||
} catch (e) {
|
||||
return e.toString()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue