Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Aug 11, 2023
1 parent 3e757b3 commit e0556e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
3 changes: 3 additions & 0 deletions components/casemap/src/casemapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ impl CaseMapper {
/// the string as a single segment (and thus only titlecasing the beginning of it). Performs
/// the specified leading adjustment behavior from the options without loading additional data.
///
/// Note that [`TitlecaseMapper`] has better behavior, most users should consider using
/// it instead. This method primarily exists for people who care about the amount of data being loaded.
///
/// This should typically be used as a lower-level helper to construct the titlecasing operation desired
/// by the application, for example one can titlecase on a per-word basis by mixing this with
/// a `WordSegmenter`.
Expand Down
5 changes: 2 additions & 3 deletions components/casemap/src/titlecase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ pub struct TitlecaseOptions {
/// assert_eq!(cm.titlecase_segment_to_string("«hello»", &root, adjust_to_cased), "«Hello»");
/// assert_eq!(cm.titlecase_segment_to_string("«hello»", &root, no_adjust), "«hello»");
///
/// // Only changed in legacy mode:
/// // Only changed in adjust-to-cased mode:
/// assert_eq!(cm.titlecase_segment_to_string("丰(abc)", &root, default_options), "丰(abc)");
/// assert_eq!(cm.titlecase_segment_to_string("丰(abc)", &root, adjust_to_cased), "丰(Abc)");
/// assert_eq!(cm.titlecase_segment_to_string("丰(abc)", &root, no_adjust), "丰(abc)");
///
/// // Only changed in legacy mode:
/// // Only changed in adjust-to-cased mode:
/// assert_eq!(cm.titlecase_segment_to_string("49ers", &root, default_options), "49ers");
/// assert_eq!(cm.titlecase_segment_to_string("49ers", &root, adjust_to_cased), "49Ers");
/// assert_eq!(cm.titlecase_segment_to_string("49ers", &root, no_adjust), "49ers");
Expand Down Expand Up @@ -250,7 +250,6 @@ impl<CM: AsRef<CaseMapper>> TitlecaseMapper<CM> {
options: TitlecaseOptions,
) -> impl Writeable + 'a {
if options.leading_adjustment == LeadingAdjustment::Auto {
// todo
// letter, number, symbol, or private use code point
const HEAD_GROUPS: GeneralCategoryGroup = GeneralCategoryGroup::Letter
.union(GeneralCategoryGroup::Number)
Expand Down
34 changes: 0 additions & 34 deletions ffi/diplomat/cpp/examples/casemapping/Makefile.orig

This file was deleted.

0 comments on commit e0556e3

Please sign in to comment.