• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 #[cfg(feature = "alloc")]
6 use crate::preferences::extensions::unicode::enum_keyword;
7 
8 #[cfg(feature = "alloc")]
9 enum_keyword!(
10     /// A Unicode Line Break Word Identifier defines preferred line break word handling behavior corresponding to the CSS level 3 word-break option.
11     ///
12     /// Specifying "lw" in a locale identifier overrides the locale’s default style (which may correspond to "normal" or "keepall").
13     ///
14     /// The valid values are listed in [LDML](https://unicode.org/reports/tr35/#UnicodeLineBreakWordIdentifier).
15     LineBreakWordHandling {
16         /// CSS lev 3 word-break=normal, normal script/language behavior for midword breaks
17         ("normal" => Normal),
18         /// CSS lev 3 word-break=break-all, allow midword breaks unless forbidden by lb setting
19         ("breakall" => BreakAll),
20         /// CSS lev 3 word-break=keep-all, prohibit midword breaks except for dictionary breaks
21         ("keepall" => KeepAll),
22         /// Prioritize keeping natural phrases (of multiple words) together when breaking,
23         /// used in short text like title and headline
24         ("phrase" => Phrase),
25 }, "lw");
26