Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Cleanups for Char Diffs #25

Open
mitsuhiko opened this issue Feb 27, 2021 · 1 comment
Open

Semantic Cleanups for Char Diffs #25

mitsuhiko opened this issue Feb 27, 2021 · 1 comment

Comments

@mitsuhiko
Copy link
Owner

mitsuhiko commented Feb 27, 2021

Related to #24 similar could benefit of having semantic cleanups for char level diffs.

https://neil.fraser.name/writing/diff/

@faassen
Copy link

faassen commented Dec 12, 2022

I just dug into this a bit, so I thought I'd leave this here for future reference:

There are implementations by Neil Fraser here, likely with more up to date versions of the code:

https://github.com/google/diff-match-patch/

There's a port to Rust of the C++ implementation here:

https://github.com/dtolnay/dissimilar

So that looks like the best place to extract the algorithms and put them into Similar, like here:

https://github.com/dtolnay/dissimilar/blob/master/src/lib.rs#L506

For my particular use case, the dissimilar implementation actually appears to work quite well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants