Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ jobs:
- name: Verify regenerated tests
run: ./scripts/unicode_gen_breaktests.py && diff testdata.rs tests/testdata/mod.rs

msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.85.0
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

semver:
name: semver
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "unicode-segmentation"
version = "1.13.1"
version = "1.13.2"
authors = ["kwantam <kwantam@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>"]

edition = "2018"
Expand All @@ -15,6 +15,7 @@ description = """
This crate provides Grapheme Cluster, Word and Sentence boundaries
according to Unicode Standard Annex #29 rules.
"""
rust-version = "1.85.0"

include = [
"COPYRIGHT",
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ unicode-segmentation = "1"

# Change Log

## 1.13.1
## 1.13.2

* [#164](https://github.com/unicode-rs/unicode-segmentation/pull/164) Set explicit 1.85 MSRV
* [#147](https://github.com/unicode-rs/unicode-segmentation/pull/147) Add ascii fast path for unicode_word_indices and unicode_words
* [#157](https://github.com/unicode-rs/unicode-segmentation/pull/157) Support Unicode 17.0.0

## 1.13.0
## 1.13.0, 1.13.1

Yanked due to accidental breakage.
Yanked due to accidental breakage and MSRV mistag.

## 1.12.0

Expand Down
4 changes: 2 additions & 2 deletions src/grapheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,14 @@ impl GraphemeCursor {
for ch in chunk.chars().rev() {
if self.grapheme_category(ch) != gr::GC_Regional_Indicator {
self.ris_count = Some(ris_count);
self.decide(ris_count.is_multiple_of(2));
self.decide(ris_count % 2 == 0);
return;
}
ris_count += 1;
}
self.ris_count = Some(ris_count);
if chunk_start == 0 {
self.decide(ris_count.is_multiple_of(2));
self.decide(ris_count % 2 == 0);
} else {
self.pre_context_offset = Some(chunk_start);
self.state = GraphemeState::Regional;
Expand Down
Loading