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

Non-ASCII characters are not recognized as tags and become h1 #743

Closed
H1rono opened this issue Jul 1, 2023 · 1 comment
Closed

Non-ASCII characters are not recognized as tags and become h1 #743

H1rono opened this issue Jul 1, 2023 · 1 comment
Labels
bug Something isn't working fixed in master
Milestone

Comments

@H1rono
Copy link

H1rono commented Jul 1, 2023

The following markdown is not converted as expected:

# index

#πŸ“

#γ‚Ώγ‚°

#?-tag

In Obsidian, #πŸ“ and #γ‚Ώγ‚° are recognized as tags and #?-tag are recognized as plain text.

obsidian-tag-test

But in obsidian-html, they are all recognized as h1.

obsidian-html-tag-test

The problems are as follows:

  • Non-ASCII characters are not included in the tag.
  • # followed by no whitespace results in h1.
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Jul 7, 2023
@dwrolvink
Copy link
Collaborator

Okay so for this spec:
https://help.obsidian.md/Editing+and+formatting/Tags#Tag+format

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)

I assumed the ascii definition of "letters" and "numbers"
Changed this to the full unicode definition.

Emoticons are not listed in the spec so this is another case of Obsidian not following its own spec.
I can confirm that emojis work though, so I added this in too.

Only the #?-tag is not yet fixed, as python-markdown turns this into a header, so it's more difficult to fix and you should not have this kind of text in your notes anyways. Otherwise you could always wrap the text in backticks.

This is fixed in master, not in the latest release, to test this code out, install the master branch:

I hope this fixes it for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in master
Projects
None yet
Development

No branches or pull requests

2 participants