jmilldotdev / obsidian-frontmatter-tag-suggest

Autocompletes tags in Obsidian YAML frontmatter. No more deleting #!
MIT License
111 stars 6 forks source link

There is an extra space before the second tag #11

Open Homoe-hs opened 2 years ago

Homoe-hs commented 2 years ago

image `` After the tag was automatically inserted, there is an extra space before the second dash

image

Then the second tag just turns into a weird one.

redactedscribe commented 2 years ago

The same happens for:

---
tags:
    - tag1
 - 
---

Each time Enter is pressed after confirming a suggested autocompletion, the plugin is adding an additional line, space, and -. Could Enter be limited to simply confirming the autocompletion as it's not a given that an additional tag is desired. If it was limited, we'd just press Enter again and Obsidian would handle the indentation and insertion of a hyphen.

Thanks.

Edit: Looks like this PR may be the answer: https://github.com/jmilldotdev/obsidian-frontmatter-tag-suggest/pull/8. I'd edit the main.ts and manually load the plugin but it appears it's not as simple as that: "Failed to load plugin obsidian-frontmatter-tag-suggest". Downloading the plugin via the community plugins shows that what gets installed is actually a main.js, which appears to be some conversion of the .ts file (inside the file reads "THIS IS A GENERATED/BUNDLED FILE BY ESBUILD") which I don't know how to do.

bdrewery commented 2 years ago

https://github.com/jmilldotdev/obsidian-frontmatter-tag-suggest/pull/8 would fix - tag becoming - tag.