Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag format doesn't match that of Obsidian #61

Open
jayemar opened this issue Jul 21, 2023 · 0 comments
Open

Tag format doesn't match that of Obsidian #61

jayemar opened this issue Jul 21, 2023 · 0 comments

Comments

@jayemar
Copy link
Collaborator

jayemar commented Jul 21, 2023

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:]_/-]*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant