obsidian-dataview icon indicating copy to clipboard operation
obsidian-dataview copied to clipboard

[WIP] Allow emoji as first character in full-line inline fields

Open THeK3nger opened this issue 3 years ago • 1 comments

While messing with my vault, I noted that I can use emoji as keys for inline fields if I embed them in a line (e.g., Today I ate [🍿::50] popcorns.). However, if I want to use the same inline field with the full line syntax (e.g., just a line with 🍿:: 50), I get zero results.

I've played a bit to the code. I added a couple of test cases in the unit tests and I've identified a regex that fixes, at least, the difference during the parsing step.

Unfortunately, this still doesn't solve the problem. Probably there is some other place in the code I am missing.

If you think this is a valid potential fix, maybe I can use a hint to complete this PR. :)

THeK3nger avatar Feb 22 '22 21:02 THeK3nger

One issue with this - there is previous precedent to not parse emoji as the first character due to people who use it purely decoratively:

- ✔️ Completed:: False
- ⚙️ Project:: Thing

Changing this precedent would break existing metadata (by changing how these are queried); we might be able to special case some scenarios (like allowing pure emoji keys with no text), but the general case will not work.

blacksmithgu avatar Mar 10 '22 02:03 blacksmithgu