Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### General changes

- Trivially updated to Unicode 17.0.0

### New in `sym`

- Currency
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ fn main() {
{
let emoji_vs_list = Path::new(&out).join("emoji-variation-sequences.txt");
if !std::fs::read_to_string(&emoji_vs_list)
.is_ok_and(|text| text.contains("Emoji Version 16.0"))
.is_ok_and(|text| text.contains("Emoji Version 17.0"))
{
let content = ureq::get(
"https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-variation-sequences.txt",
"https://www.unicode.org/Public/17.0.0/ucd/emoji/emoji-variation-sequences.txt",
)
.call()
.unwrap()
Expand Down
14 changes: 4 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,15 @@ mod test {
#[test]
fn symbols_are_not_emojis() {
assert!(
are_all_variants_valid(
SYM,
|c| !c.contains(EMOJI_PRESENTATION_SELECTOR),
) ,
are_all_variants_valid(SYM, |c| !c.contains(EMOJI_PRESENTATION_SELECTOR)),
"unexpected use of emoji presentation selector in `sym` (see list above)",
)
}

#[test]
fn emojis_are_not_text() {
assert!(
are_all_variants_valid(
EMOJI,
|c| !c.contains(TEXT_PRESENTATION_SELECTOR),
) ,
are_all_variants_valid(EMOJI, |c| !c.contains(TEXT_PRESENTATION_SELECTOR)),
"unexpected use of text presentation selector in `emoji` (see list above)",
)
}
Expand Down Expand Up @@ -270,7 +264,7 @@ mod test {
assert!(
are_all_variants_valid(SYM, |c| {
// All emoji variation sequences are exactly 2 codepoints long
// as of Unicode 16.0, so this doesn't miss anything.
// as of Unicode 17.0, so this doesn't miss anything.
!(c.chars().count() == 1
&& require_presentation_selector.contains(&c.chars().next().unwrap()))
}),
Expand All @@ -288,7 +282,7 @@ mod test {
assert!(
are_all_variants_valid(EMOJI, |c| {
// All emoji variation sequences are exactly 2 codepoints long
// as of Unicode 16.0, so this doesn't miss anything.
// as of Unicode 17.0, so this doesn't miss anything.
!(c.chars().count() == 1
&& require_presentation_selector.contains(&c.chars().next().unwrap()))
}),
Expand Down
4 changes: 2 additions & 2 deletions src/styling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::iter::FusedIterator;

/// The version of [Unicode](https://www.unicode.org/) that this version of the
/// styling module is based on.
pub const UNICODE_VERSION: (u8, u8, u8) = (16, 0, 0);
pub const UNICODE_VERSION: (u8, u8, u8) = (17, 0, 0);

/// A style for mathematical symbols.
///
Expand Down Expand Up @@ -408,7 +408,7 @@ pub fn to_style(c: char, style: MathStyle) -> ToStyle {
/// - [Mathematical Alphanumeric Symbols]
/// - [Arabic Mathematical Alphabetic Symbols]
///
/// [Unicode Core Specification - Section 22.2, Letterlike Symbols]: <https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-22/#G14143>
/// [Unicode Core Specification - Section 22.2, Letterlike Symbols]: <https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-22/#G14143>
/// [Letterlike Symbols]: <https://unicode.org/charts/PDF/U2100.pdf>
/// [Mathematical Alphanumeric Symbols]: <https://unicode.org/charts/PDF/U1D400.pdf>
/// [Arabic Mathematical Alphabetic Symbols]: <https://unicode.org/charts/PDF/U1EE00.pdf>
Expand Down