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

Contact entry not recognised if @ is in the telegram field

Open mofosyne opened this issue 1 year ago • 2 comments

Just discovered that if I added @ to telegram: thinkerer like telegram: @thinkerer the contact plugin will not add the contact in... looks like a bug

Below is the minimum test file I used to replicate the issue

---
name:
  first: Test
  last: Tester
phone:
telegram: @Test
linkedin:
birthday:
last_chat:
friends:
type: contact
---

mofosyne avatar May 03 '23 17:05 mofosyne

Unfortunately, this is Obsidian API limitation, as a workaround you can use quotes:

---
name:
  first: Test
  last: Tester
phone:
telegram: "@Test"
linkedin:
birthday:
last_chat:
friends:
type: contact
---

But I will see if it makes sense to use custom yaml parser instead of Obsidian API.

vbeskrovnov avatar Aug 27 '23 20:08 vbeskrovnov

https://yaml.org/spec/1.2-old/spec.html#id2772075

commercial-at: @text
grave-accent: `text

Above would give ERROR: Reserved indicators can't start a plain scalar. as the “@” (#x40, at) and “`” (#x60, grave accent) are reserved for future use.


So yeah it will need to be a non standard YAML parser. (Or at least provide a visible indicator that this is invalid)

mofosyne avatar Aug 28 '23 01:08 mofosyne