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

Feat #903: Added support for emoji tags #1125

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

badsketch
Copy link
Contributor

@badsketch badsketch commented Dec 22, 2022

Capture
Resolves #903; This should allow for most emojis to be supported with pure emoji tags, text + emoji tags, and nested emoji tags. I opted for \p{Emoji_Presentation} over \p{Emoji} because (TIL) numbers are emojis and the latter would permit pure number tags #123 through, which we don't want.

This has weird behavior with keycap sequences such as 1️⃣, 9️⃣, as these are encoded as a digit, a variation selector, and enclosing number cap. So currently, a note with #example1️⃣ and a note with #example1 would result in sharing the same tag. I thought maybe this would be an edge case, but in case we do want full support, I can look into adding that, but it would probably mean adding something harder to read to the existing regex like (\u00a9|\u00ae|[\u2000-\u3300]|\ud83d[\ud000-\udfff]).

Also, let me know if the tests are sufficient. I could add an e2e test to tags.test.ts, but wasn't sure since those test more general tag functionality than the type of tags.

Appreciate any feedback!

Copy link
Collaborator

@riccardoferretti riccardoferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the amazing work @badsketch

Everything you say makes sense, the test coverage looks good, it looks great!

@riccardoferretti
Copy link
Collaborator

Actually can you fix the lint errors? :)

@badsketch
Copy link
Contributor Author

Sure thing, pushed 👍

@riccardoferretti riccardoferretti merged commit 4758923 into foambubble:master Jan 3, 2023
@riccardoferretti
Copy link
Collaborator

@allcontributors add @badsketch for code

@allcontributors
Copy link
Contributor

@riccardoferretti

I've put up a pull request to add @badsketch! 🎉

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

Successfully merging this pull request may close these issues.

Allow using emoji in tags
2 participants