From 51196d76df5a847bf292e14d8de0d138fbcef1af Mon Sep 17 00:00:00 2001 From: Ronit Rameja Date: Mon, 20 Apr 2026 19:31:21 +0530 Subject: [PATCH] updated the version to 2.1.4 --- CHANGELOG.md | 6 ++++++ README.md | 2 +- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee5cd27..8da390f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.1.4 + +### Fixed +- **Unicode rune correctness**: Replaced all `codeUnits` (UTF-16) usage with `runes` (Unicode code points) throughout `SafeTextFilter` and `AhoCorasick`. This fixes incorrect indexing and potential missed/false matches for characters outside the Basic Multilingual Plane (e.g. emoji, supplementary CJK characters). +- Word-boundary checks, match-range offsets, and string reconstruction now operate on rune indices, ensuring accurate filtering for all Unicode input. + ## 2.1.3 ### Documentation diff --git a/README.md b/README.md index 6947f62..cf60d95 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Or manually add it to your `pubspec.yaml`: ```yaml dependencies: - safe_text: ^2.1.3 + safe_text: ^2.1.4 ``` Then run: diff --git a/pubspec.yaml b/pubspec.yaml index 2e20310..404495f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: safe_text description: A Flutter package for filtering out bad words from text inputs and detecting phone numbers in various formats including multiplier words. -version: 2.1.3 +version: 2.1.4 homepage: https://github.com/master-wayne7/safe_text repository: https://github.com/master-wayne7/safe_text issue_tracker: https://github.com/master-wayne7/safe_text/issues