YAML entry with commas within quotation marks should produce a single entry

Obisidian has decided that a comma is a separator even when it is within quotation marks. So entering “O Brother, Where Art Thou?” as an alias means that you will end up with two aliases: “O Brother” and “Where Art Thou?”.

But one of the reasons we use quotation marks is precisely to keep a phrase together, or to take into account punctuation marks within a phrase.

I can understand wanting ease of input, and using a comma as a separator, but not when it is within quotation marks!

Please reconsider this decision.
See Alias wrapped in quotation marks splitting at comma - #6 by WhiteNoise.

5 Likes

To repeat myself in the bug report, the current behavior is not standard. This was a decision made by licat to ease entering multiple aliases inline.

To be standard BOTH aliases: a, b AND aliases: "a, b" should be interpreted as ONE alias a, b .

If you want to adhere more strictly to YAML, I suggest you use the square bracket notation ["a, b"] .

Seems like with tags: Intentionally breaking YAML syntax for the “benefit” of the user (by splitting YAML str’s by ,).

Personally, I’d prefer Obsidian sticking with YAML syntax, i.e.

  • aliases: 'One, two and three'one alias
  • aliases: "One, two and three"one alias
  • aliases: One, two and threeone alias
  • aliases: ['One', 'two and three']two aliases
  • aliases: ["One", "two and three"]two aliases
  • aliases: [One, two and three]two aliases
  • aliases:
      - One, two and three
    
    one alias
  • aliases:
      - One
      - two and three
    
    two aliases
  • and so on …

(Added this here after conversing with @WhiteNoise. I support the FR of “standard YAML”.)

4 Likes

I’d prefer the YAML standard way too.

This breach of yaml standards breaks my vault. I have nearly 2.000 files in need of manual revision because the analysis of the translated title stored as aliases is important.

I hope Licat reconsiders this decission.

2 Likes

I add another problem caused by Obsidian’s non-standard YAML: aliases break if they contain any number above a thousand.

An alias “Ailson plans to cut 1,000,500 jobs globally” is listed as three different notes: “Ailson plans to cut 1”, “000” and “500 jobs globally”.

I ran into this as well. If you want to use YAML, use it correctly. If you want to roll your own, fine, but don’t call it YAML!