Skip to content

Specify all presentation sequences #114

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ mod test {
.collect::<HashSet<_>>();
assert!(
are_all_variants_valid(SYM, |c| {
// All text presentations are exactly 2 codepoints long as of
// Unicode 16.0, so this doesn't miss anything.
!(c.chars().count() == 1
&& require_presentation_selector.contains(&c.chars().next().unwrap()))
}),
Expand All @@ -285,6 +287,8 @@ mod test {
.collect::<HashSet<_>>();
assert!(
are_all_variants_valid(EMOJI, |c| {
// All text presentations are exactly 2 codepoints long as of
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this say "emoji" instead of "text"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed to "emoji variation sequences" everywhere, as this is how text/emoji presentation sequences seem to be referred to by Unicode.

// Unicode 16.0, so this doesn't miss anything.
!(c.chars().count() == 1
&& require_presentation_selector.contains(&c.chars().next().unwrap()))
}),
Expand Down