diff --git a/crates/typst-library/Cargo.toml b/crates/typst-library/Cargo.toml index e0af6a56b..34214eb5e 100644 --- a/crates/typst-library/Cargo.toml +++ b/crates/typst-library/Cargo.toml @@ -25,11 +25,11 @@ csv = "1" ecow = { version = "0.2", features = ["serde"] } hayagriva = "0.3.2" hypher = "0.1.4" -icu_properties = { version = "1.2.0", features = ["serde"] } -icu_provider = { version = "1.2.0", features = ["sync"] } -icu_provider_adapters = "1.2.0" -icu_provider_blob = "1.2.0" -icu_segmenter = { version = "1.2.1", features = ["serde"] } +icu_properties = { version = "1.3", features = ["serde"] } +icu_provider = { version = "1.3", features = ["sync"] } +icu_provider_adapters = "1.3" +icu_provider_blob = "1.3" +icu_segmenter = { version = "1.3", features = ["serde"] } kurbo = "0.9" lipsum = "0.9" log = "0.4" diff --git a/crates/typst-library/assets/icudata.postcard b/crates/typst-library/assets/icudata.postcard index e910bf8e4..a1fdbd480 100644 Binary files a/crates/typst-library/assets/icudata.postcard and b/crates/typst-library/assets/icudata.postcard differ diff --git a/crates/typst-library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs index 9255124e3..1cd749c83 100644 --- a/crates/typst-library/src/layout/par.rs +++ b/crates/typst-library/src/layout/par.rs @@ -1092,21 +1092,27 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec { } } - // Fix for https://github.com/unicode-org/icu4x/issues/3811 - if !self.mandatory { - while let Some(&next) = self.linebreaks.peek() { - if !self.p.bidi.text[self.end..next] - .contains(|c: char| !c.is_whitespace()) - { - self.end = next; - self.linebreaks.next(); - } else { - break; - } - } - } - self.offset = self.end; Some((self.end, self.mandatory, false)) }