mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
478 stars 27 forks source link

Quoted Fields #615

Closed ChristinWhite closed 4 months ago

ChristinWhite commented 4 months ago

Issue

I have a few fields that I'd like to be able to use some characters that syntactically significant and/or invalid for use in an unquoted YAML string such as !, :, [ and ]. This isn't a problem if I quote the string Prefix: "!Question" or Icon: ":obs_note_glyph:" in terms of Yaml but Metadata Menu doesn't seem to be able to handle this case.

There are a couple of different behaviors here that I'm seeing:

Desired Solution

Ideally, Metadata Menu would know that an entered character needs to make the value quoted and do so. But accepting ' and " in the input field would be another reasonable and probably simpler solution.

Either way, Metadata Menu should be able to correctly read a quoted property.

Workaround

Not sure yet, my best idea is for fields that I need this kind of behavior I can edit the frontmatter manually or I could turn the input field into an object with string field and a type like List Callout or Icon Shortcode and add logic to Dataview to prepend an ! or wrap the value in : symbols respectively but that's a lot of complexity.

That said, this is not a high priority issue for me. My use cases are primarily presentational, not semantic.

Environment

Obsidian: 1.5.8 Metadata Menu: 0.8.3

mdelobelle commented 4 months ago

Hi can you test the latest beta release? https://github.com/mdelobelle/metadatamenu/releases/tag/0.8.4-beta-2 It should suit your need

ChristinWhite commented 4 months ago

Flawless, you rock!