diff --git a/src/text/inline.rs b/src/text/inline.rs index c9f0f7f..0b252ac 100644 --- a/src/text/inline.rs +++ b/src/text/inline.rs @@ -147,6 +147,12 @@ impl<'s, T: DiffableStr + ?Sized> InlineChange<'s, T> { /// /// Each item is a tuple in the form `(emphasized, value)` where `emphasized` /// is true if it should be highlighted as an inline diff. + /// + /// By default, words are split by whitespace, which results in coarser diff. + /// For example: `"f(x) y"` is tokenized as `["f(x)", "y"]`. + /// + /// If you want it to be tokenized instead as `["f(", "x", ")"]`, + /// you should enable the `"unicode"` flag. pub fn iter_strings_lossy(&self) -> impl Iterator)> { self.values() .iter()