my fork of dmp
Merge branch 'main' of github.com:AnubhabB/diff-match-patch-rs
Anubhab Bandyopadhyay 2024-11-17
parent 41b4c45 · parent 2560e0c · commit fd875c3
-rw-r--r--CHANGELOG.md6
-rw-r--r--README.md2
-rw-r--r--src/lib.rs15
3 files changed, 15 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20a4120..b53acc3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# CHANGELOG.md
+## 0.3.2
+
+Fix:
+
+ - Minor fix for [Issue](https://github.com/AnubhabB/diff-match-patch-rs/issues/7)
+
## 0.3.1
Fix:
diff --git a/README.md b/README.md
index b2762b3..32b446a 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ A very **fast**, **accurate** and **wasm ready** port of [Diff Match Patch](http
```toml
[dependencies]
-diff-match-patch-rs = "0.3.0"
+diff-match-patch-rs = "0.3.2"
```
### `Effitient` mode
diff --git a/src/lib.rs b/src/lib.rs
index 29f5a61..06eb3dc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,7 +23,7 @@
//!
//! ```toml
//! [dependencies]
-//! diff-match-patch-rs = "0.3.0"
+//! diff-match-patch-rs = "0.3.2"
//! ```
//!
//! ### `Effitient` mode
@@ -149,7 +149,7 @@
//! ### `Match` - fuzzy match of pattern in Text
//!
//! ```rust
-//! use diff_match_patch_rs::{DiffMatchPatch, Compat, Error, PatchInput};
+//! use diff_match_patch_rs::{DiffMatchPatch, Efficient, Error, PatchInput};
//! // This is the source text
//! const TXT: &str = "I am the very model of a modern Major-General, I've information on vegetable, animal, and mineral, 🚀👏👀";
//!
@@ -157,12 +157,13 @@
//! const PATTERN: &str = " that berry ";
//!
//! // Returns `location` of match if found, `None` if not found
-//! fn main() -> Option<usize> {
-//! let dmp = DiffMatchPatch::new();
+//! fn main() {
+//! let dmp = DiffMatchPatch::new();
//!
-//! // works with both `Efficient` and `Compat` modes
-//! // `5` here is an approx location to find `nearby` matches
-//! dmp.match_main::<Efficient>(TXT, PATTERN, 5) // this should return Some(4)
+//! // works with both `Efficient` and `Compat` modes
+//! // `5` here is an approx location to find `nearby` matches
+//! let res = dmp.match_main::<Efficient>(TXT, PATTERN, 5);
+//! println!("{:?}", res); // Should print `Some(4)`
//! }
//! ```
//!