Upgrade to icu4x 2.0.0

Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
Nico Burns 2025-07-02 02:56:03 +01:00
parent a13f9bce62
commit 96f599bdf1
6 changed files with 319 additions and 96 deletions

View file

@ -6,6 +6,7 @@ use std::borrow::Cow;
use std::char::{ToLowercase, ToUppercase};
use icu_segmenter::WordSegmenter;
use icu_segmenter::options::WordBreakInvariantOptions;
use itertools::izip;
use style::computed_values::white_space_collapse::T as WhiteSpaceCollapse;
use style::values::specified::text::TextTransformCase;
@ -676,7 +677,7 @@ pub(crate) fn capitalize_string(string: &str, allow_word_at_start: bool) -> Stri
let mut output_string = String::new();
output_string.reserve(string.len());
let word_segmenter = WordSegmenter::new_auto();
let word_segmenter = WordSegmenter::new_auto(WordBreakInvariantOptions::default());
let mut bounds = word_segmenter.segment_str(string).peekable();
let mut byte_index = 0;
for character in string.chars() {