As far as YAML goes, the above returns a str (correct, to my knowledge), but it seems Obsidian somehow splits the str by commas.
It probably makes it easier for an average user (YAML can be confusing and has some odd rules!) and maybe they thought about tags when programming this, but I still think it’s probably wrong, from a YAML standpoint.
In a YAML str type scalar, the comma has no special meaning, whereas in a (flow) sequence or map it has.
Example:
aliases: this, that
this, that is one str.
aliases: [this, that]
[this, that] is a flow sequence of two comma-separated strs: this and that.
aliases:
- this
- that
is also a sequence of two strs: this and that.
Interestingly, in the latter case, Obsidian does it correct: It returns the this and that strings even if they contain commas:
aliases:
- this
- that, but it has a comma
will return (correctly) two strs: this and that, but it has a comma!
So yes, I’d consider the current behaviour a bug.
Reference: YAML Ain’t Markup Language (YAML™) Version 1.2