Skip to content

Commit

Permalink
Replace unicode-general-category with icu-properties (helix-editor#10989
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kirawi committed Jun 18, 2024
1 parent 0edf609 commit 9b7dffb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
8 changes: 1 addition & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion helix-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ smallvec = "1.13"
smartstring = "1.0.1"
unicode-segmentation = "1.11"
unicode-width = "0.1"
unicode-general-category = "0.6"
icu_properties = "1.5"
slotmap.workspace = true
tree-sitter.workspace = true
once_cell = "1.19"
Expand Down
4 changes: 2 additions & 2 deletions helix-core/src/chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ pub fn char_is_whitespace(ch: char) -> bool {

#[inline]
pub fn char_is_punctuation(ch: char) -> bool {
use unicode_general_category::{get_general_category, GeneralCategory};
use icu_properties::{maps::general_category, GeneralCategory};

matches!(
get_general_category(ch),
general_category().get(ch),
GeneralCategory::OtherPunctuation
| GeneralCategory::OpenPunctuation
| GeneralCategory::ClosePunctuation
Expand Down
2 changes: 1 addition & 1 deletion helix-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod transaction;
pub mod wrap;

pub mod unicode {
pub use unicode_general_category as category;
pub use icu_properties as properties;
pub use unicode_segmentation as segmentation;
pub use unicode_width as width;
}
Expand Down

0 comments on commit 9b7dffb

Please sign in to comment.