mirror of
https://github.com/servo/servo.git
synced 2025-08-21 05:15:33 +01:00
Upgrade to icu4x 2.0.0
Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
parent
a13f9bce62
commit
96f599bdf1
6 changed files with 319 additions and 96 deletions
|
@ -5,6 +5,7 @@
|
|||
use std::ops::Range;
|
||||
|
||||
use icu_segmenter::LineSegmenter;
|
||||
use icu_segmenter::options::LineBreakOptions;
|
||||
|
||||
pub(crate) struct LineBreaker {
|
||||
linebreaks: Vec<usize>,
|
||||
|
@ -13,7 +14,7 @@ pub(crate) struct LineBreaker {
|
|||
|
||||
impl LineBreaker {
|
||||
pub(crate) fn new(string: &str) -> Self {
|
||||
let line_segmenter = LineSegmenter::new_auto();
|
||||
let line_segmenter = LineSegmenter::new_auto(LineBreakOptions::default());
|
||||
Self {
|
||||
// From https://docs.rs/icu_segmenter/1.5.0/icu_segmenter/struct.LineSegmenter.html
|
||||
// > For consistency with the grapheme, word, and sentence segmenters, there is always a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue