blacksmithgu / obsidian-dataview Public
generated from obsidianmd/obsidian-sample-pluginNew issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single item in YAML array not shown, interpreted as "Link" #283
Comments
|
Haha, you are stupendously good at breaking all of my heuristics. This is borne from a hack to parse links in frontmatter since they are parsed as double-nested lists in YAML. It was intended for parsing things like Perhaps I should disable link detection in frontmatter or at the very least change the detection (to use a special string construct or require that they are quoted). |
But I can see where it comes from "set of sets", or "array in array". Wikilinks and YAML are a mega-pita. But of course everybody likes the nice suggest box … me too. Sigh. I fear, though, that wikilinks in YAML won’t survive long—just too much idiotic stuff for programmers to get at their content, and users will never understand why they should use parenthese, not use constructs like Actually much like your necessity-born Plus, it’s not easy making users understand why—in an otherwise elegant and practical app like Obsidian—sometimes things have to be so "odd", "quirky", "complicated" and "programmer-like". I feel with you. Unfortunately, I also don’t have the great idea. As much as I’d love to use wikilinks in YAML, I understand that YAML is YAML, and simply don’t. YAML syntax can be problematic enough, in some special cases. Still, that’s what we have, and so its syntax must be adhered to, even if users don’t like it. |
|
It appears that it's still possible to use Obsidian's link autocomplete inside of quotes, like so: So perhaps I will swap to that. |
|
Or in which seems a little "cleaner" to me, because both just add another array around them, in the same way, so these could be used alternatively. (Personally, I think getting at array elements is a little easier than having to parse a string, programmatically. In |
|
As of 0.4.5, Dataview now uses the Obsidian suggested way of links in frontmatter, via quoting them: key: "[[Link]]" |
I’m trying to build a recipe list that uses an ingredients list in YAML.
For some odd reason, if I only have one item in there, Dataview interprets it as a "Link" (instead of an Array). I assume Dataview parses items in the YAML frontmatter as Markdown, which it shouldn’t. It would then look like an incomplete Markdown link
["sugar, white", 20 g]without the()part.This fails:
This works:
Here is the complete Obsidian note plus some screenshots:
The text was updated successfully, but these errors were encountered: