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:
Input !Test: Nothing saved to frontmatter, field remains <empty>.
Input :Test: Value is saved but Metadata Menu treats it as <missing>.
Input [Test]: Value is saved and Metadata Menu treats it as Test, valid but not actually what I wanted.
Input "Test" or 'Test': Value is saved as Test.
Input "!Test" or '!Test': Value is saved as !Test, Metadata Menu treats it as <empty>.
Input ":Test" or ':Test': Value is saved as :Test, Metadata Menu treats it as <missing>.
Input "[Test]" or '[Test]: Value is saved as [Test], Metadata Menu treats it as Test
Input \!Test: Value is saved as \!Test, Metadata Menu treats it as \!Testusually but I've also seen !Test, I can't reproduce it however.
Input \:Test: Value is saved as \:Test, Metadata Menu treats it as \:Test.
Input \[Test\]: Metadata Menu doesn't let you save and converts the string to \:Test in the entry window.
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.
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 stringPrefix: "!Question"
orIcon: ":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:
!Test
: Nothing saved to frontmatter, field remains<empty>
.:Test
: Value is saved but Metadata Menu treats it as<missing>
.[Test]
: Value is saved and Metadata Menu treats it asTest
, valid but not actually what I wanted."Test"
or'Test'
: Value is saved asTest
."!Test"
or'!Test'
: Value is saved as!Test
, Metadata Menu treats it as<empty>
.":Test"
or':Test'
: Value is saved as:Test
, Metadata Menu treats it as<missing>
."[Test]"
or'[Test]
: Value is saved as[Test]
, Metadata Menu treats it asTest
\!Test
: Value is saved as\!Test
, Metadata Menu treats it as\!Test
usually but I've also seen!Test
, I can't reproduce it however.\:Test
: Value is saved as\:Test
, Metadata Menu treats it as\:Test
.\[Test\]
: Metadata Menu doesn't let you save and converts the string to\:Test
in the entry window.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
orIcon 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