blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.94k stars 411 forks source link

custom frontmeta field named "From" #2448

Open warm-july opened 1 week ago

warm-july commented 1 week ago

What happened?

---
cday: 2024-08-31
tags: 
From: "[[Documentation]]"
Related:
  - "[[2024 CIS 5530]]"
aliases:
  - cpp
---

this is what my frontmatter looks like, which contains a field named From, so when I try to use From as a field in functions like contains(), it gives me a syntax error:


Dataview: Error: 
-- PARSING FAILED --------------------------------------------------

  2 |   file.folder AS "Folder"
  3 | FROM "Documentation"
> 4 | WHERE contains(join(Related), "cpp") OR contains(From, "C++")
    |                                                      ^

Expected:

variable

DQL

TABLE
    file.folder AS "Folder"
FROM "Documentation"
WHERE contains(join(Related), "cpp") OR contains(From, "C++")

JS

No response

Dataview Version

0.5.67

Obsidian Version

1.6.7

OS

Windows

AB1908 commented 4 days ago

Seems like a parser bug. I can tell you where the bug probably is but no time to fix it on my own at the moment. Would you like to attempt a fix?

warm-july commented 4 days ago

Seems like a parser bug. I can tell you where the bug probably is but no time to fix it on my own at the moment. Would you like to attempt a fix?

Oh cool, sure I'm not very good but would love to try. Thnx!