obsidian.el
obsidian.el copied to clipboard
Tag format doesn't match that of Obsidian
From the Obsidian page on tag:
You can use any of the following characters in your tags:
Alphabetical letters Numbers Underscore (_) Hyphen (-) Forward slash (/) for [Nested tags](https://help.obsidian.md/Editing+and+formatting/Tags#Nested%20tags)
Tags must contain at least one non-numerical character. For example, #1984 isn't a valid tag, but #y1984 is.
Tags can't contain blank spaces.
obsidian.el currently allows plus sign, as well as numerical-only tags, neither of which are valid Obsidian tags.
Ideally, the obsidian--tag-regex
could be updated to match that of Obsidan. The regex below comes close, but it will also extract tags from the middle of a string which I do not believe are valid Obsidian tags. (For example, it will extract #bar
from foo#bar
and treat it like a tag.)
"#[[:alnum:]_/-]*[[:alpha:]_/-]+[[:alnum:]_/-]*"