Skip to main content

icu_locale_core/preferences/extensions/unicode/keywords/
line_break.rs

1// This file is part of ICU4X. For terms of use, please see the file
2// called LICENSE at the top level of the ICU4X source tree
3// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5use crate::preferences::extensions::unicode::enum_keyword;
6
7enum_keyword!(
8    /// A Unicode Line Break Style Identifier defines a preferred line break style corresponding to the CSS level 3 line-break option.
9    ///
10    /// Specifying "lb" in a locale identifier overrides the locale’s default style
11    /// (which may correspond to "normal" or "strict").
12    ///
13    /// The valid values are listed in [LDML](https://unicode.org/reports/tr35/#UnicodeLineBreakStyleIdentifier).
14    LineBreakStyle {
15        /// CSS level 3 line-break=strict, e.g. treat CJ as NS
16        ("strict" => Strict),
17        /// CSS level 3 line-break=normal, e.g. treat CJ as ID, break before hyphens for ja,zh
18        ("normal" => Normal),
19        /// CSS lev 3 line-break=loose
20        ("loose" => Loose),
21}, "lb");