mitsuhiko / similar

A high level diffing library for rust based on diffs
https://insta.rs/similar
Apache License 2.0
949 stars 31 forks source link

doc(inline/iter_strings_lossy): describe different behaviors #52

Closed wongjiahau closed 11 months ago

wongjiahau commented 11 months ago

Preface

When I copied the code from the terminal-inline example, I expected it to work as shown in the README Screenshot:

image

However, when I copied the code to my own project, it behaved differently. Specifically, the word was split by whitespace instead of non-alphanumeric characters.

It took me a while to figure out that the culprit was the unicode flag, which I did not enable in my project.

Reference