Skip to content

Commit 458a0b6

Browse files
authored
Update to Unicode 17 (#123)
1 parent 4b4b3a5 commit 458a0b6

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### General changes
6+
7+
- Trivially updated to Unicode 17.0.0
8+
59
### New in `sym`
610

711
- Mathematical symbols

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ fn main() {
7272
{
7373
let emoji_vs_list = Path::new(&out).join("emoji-variation-sequences.txt");
7474
if !std::fs::read_to_string(&emoji_vs_list)
75-
.is_ok_and(|text| text.contains("Emoji Version 16.0"))
75+
.is_ok_and(|text| text.contains("Version: 17.0"))
7676
{
7777
let content = ureq::get(
78-
"https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-variation-sequences.txt",
78+
"https://www.unicode.org/Public/17.0.0/ucd/emoji/emoji-variation-sequences.txt",
7979
)
8080
.call()
8181
.unwrap()

src/lib.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,21 +199,15 @@ mod test {
199199
#[test]
200200
fn symbols_are_not_emojis() {
201201
assert!(
202-
are_all_variants_valid(
203-
SYM,
204-
|c| !c.contains(EMOJI_PRESENTATION_SELECTOR),
205-
) ,
202+
are_all_variants_valid(SYM, |c| !c.contains(EMOJI_PRESENTATION_SELECTOR)),
206203
"unexpected use of emoji presentation selector in `sym` (see list above)",
207204
)
208205
}
209206

210207
#[test]
211208
fn emojis_are_not_text() {
212209
assert!(
213-
are_all_variants_valid(
214-
EMOJI,
215-
|c| !c.contains(TEXT_PRESENTATION_SELECTOR),
216-
) ,
210+
are_all_variants_valid(EMOJI, |c| !c.contains(TEXT_PRESENTATION_SELECTOR)),
217211
"unexpected use of text presentation selector in `emoji` (see list above)",
218212
)
219213
}
@@ -270,7 +264,7 @@ mod test {
270264
assert!(
271265
are_all_variants_valid(SYM, |c| {
272266
// All emoji variation sequences are exactly 2 codepoints long
273-
// as of Unicode 16.0, so this doesn't miss anything.
267+
// as of Unicode 17.0, so this doesn't miss anything.
274268
!(c.chars().count() == 1
275269
&& require_presentation_selector.contains(&c.chars().next().unwrap()))
276270
}),
@@ -288,7 +282,7 @@ mod test {
288282
assert!(
289283
are_all_variants_valid(EMOJI, |c| {
290284
// All emoji variation sequences are exactly 2 codepoints long
291-
// as of Unicode 16.0, so this doesn't miss anything.
285+
// as of Unicode 17.0, so this doesn't miss anything.
292286
!(c.chars().count() == 1
293287
&& require_presentation_selector.contains(&c.chars().next().unwrap()))
294288
}),

src/styling.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::iter::FusedIterator;
55

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

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

0 commit comments

Comments
 (0)