Feat #903: Added support for emoji tags #1125
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!