FR: Format YAML Arrays
See original GitHub issueI would like a feature that unwraps yaml collections in frontmatter (per example 2.3 here). This was an option on an older obsidian linter.
Example:
---
tags: [red, yellow, green]
aliases: [Note, 'Note , Comma', BigNote]
===
would convert to:
---
tags:
- red
- yellow
- green
aliases:
- Note
- Note , Comma
- BigNote
---
The dataview plugin allows arbitrary fields in frontmatter, so this functionality would not be limited to fields recognized by Obsidian. (Perhaps there would be an option to list the fields that should be unwrapped)
Describe Alternatives You’ve Considered
I have not been able to think of any alternatives other than manually doing this.
Issue Analytics
- State:
- Created a year ago
- Comments:11
Top Results From Across the Web
YAML - Array & collection - W3schools.io
An array is a group of similar values with a single name. In YAML, Array represents a single key mapped to multiple values....
Read more >YAML Arrays - Linux Hint
In YAML, an array may be defined in two ways. Each element is defined on a single line in the standard style, and...
Read more >YAML Multi-Line Arrays - Stack Overflow
A YAML array can be represented as: ['key1', 'key2', 'key3'] . A YAML sequence uses a dash followed by a space and then...
Read more >How to represent arrays in YAML - Educative.io
The block sequence style of YAML uses hyphens or dashes to ( - ) to represent arrays. A hyphen ( - ) followed...
Read more >The YAML Format (Symfony Docs)
A YAML file is rarely used to describe a simple scalar. Most of the time, it describes a collection. YAML collections can be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems to also take care of https://github.com/platers/obsidian-linter/issues/172 as well.
Gotcha. I thought you were saying Obsidian Lint did make these kinds of changes prior. I will see what can be done around this.