Skip to content

Update Note.renderValueString() in note.ts#792

Open
FMeinicke wants to merge 1 commit into
mdelobelle:masterfrom
FMeinicke:master
Open

Update Note.renderValueString() in note.ts#792
FMeinicke wants to merge 1 commit into
mdelobelle:masterfrom
FMeinicke:master

Conversation

@FMeinicke

@FMeinicke FMeinicke commented Apr 21, 2026

Copy link
Copy Markdown

to allow correct rendering of formula fields when the value is an array.

Before, arrays would be enclosed in double quotes, which made Obsidian think that the value was a string that happened to have commas in it when it should have been an array instead.

Use the indented list style to render arrays, as it turns out, Obsidian will automatically reformat frontmatter fields with type 'list' to the indented list style when the value was previously an inline array. This reformatting is done when another frontmatter field is modified (e.g., removed in case of a list style field).
This change of the field value subsequently results in invalid YAML being generated for the frontmatter because MetadataMenu will add the inline array style value where Obsidian had put the indented list style. The only way around this IMO is to force the indented list style for formula field values that are arrays.

Would fix #782, and fix #486.

@FMeinicke FMeinicke force-pushed the master branch 2 times, most recently from d25747c to d49aad0 Compare April 21, 2026 13:34
to allow correct rendering of formula fields when the value is an array.

Before, arrays would be enclosed in double quotes, which made Obsidian
think that the value was a string that happened to have commas in it
when it should have been an array instead.

Use the indented list style to render arrays, as it turns out, Obsidian
will automatically reformat frontmatter fields with type 'list' to the
indented list style when the value was previously an inline array. This
reformatting is done when another frontmatter field is modified (e.g.,
removed in case of a list style field).
This change of the field value subsequently results in invalid YAML
being generated for the frontmatter because MetadataMenu will add the
inline array style value where Obsidian had put the indented list style.
The only way around this IMO is to force the indented list style for
formula field values that are arrays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Support formula return types other than string Formula value displayed as lost

1 participant