Add simple Hunt–McIlroy LCS algorithm (#10)

This commit is contained in:
Armin Ronacher 2021-02-14 23:11:29 +01:00 committed by GitHub
parent df78bdca1c
commit bee5d88b02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 267 additions and 0 deletions

View file

@ -47,6 +47,7 @@ pub use replace::Replace;
#[doc(no_inline)]
pub use crate::Algorithm;
pub mod lcs;
pub mod myers;
pub mod patience;
@ -71,6 +72,7 @@ where
match alg {
Algorithm::Myers => myers::diff(d, old, old_range, new, new_range),
Algorithm::Patience => patience::diff(d, old, old_range, new, new_range),
Algorithm::Lcs => lcs::diff(d, old, old_range, new, new_range),
}
}