Preserve single-paired quoted values in YAML keys when using the new Property interface

Steps to reproduce

Add YAML front matter to a file that includes the key “tags” and as value a list of tags formatted as '#tagname' (valid tag, valid YAML due to inclusion of single quotes), e.g.:

tags:
    - '#meeting'
    - '#work'

Now edit the tags inside Obsidian as part of the file Properties, e.g. by adding another tag.

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

The formatting of the existing tags is not changed.
Ideally: New tags use the same formatting. (A setting to handle this would also be great.)

Actual result

Tags are reformatted, the preceding hash sign is stripped.
The above example would look like this:

tags:
    - meeting
    - work

Environment

SYSTEM INFO:
Obsidian version: v1.4.2
Installer version: v1.2.8
Operating system: #1 SMP PREEMPT_DYNAMIC Mon, 24 Jul 2023 20:19:38 +0000 6.4.6-arch1-1
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

The reason I see the behavior as a problem is that it breaks any workflow outside of Obsidian that relies on finding tags in the files by looking for words preceded directly by a hash sign. Parsing the front matter YAML is not an alternative as that is vastly more complicated and not even possible in some circumstances where only simple text search is available.

2 Likes