From 7604b7743b267cdaef4073df8ead9446ef94bac5 Mon Sep 17 00:00:00 2001 From: ghassmo Date: Thu, 25 Aug 2022 11:27:22 +0400 Subject: [PATCH] bin/darkwikid: remove calling trim() on documents --- bin/darkwikid/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/darkwikid/src/main.rs b/bin/darkwikid/src/main.rs index bfc980f73..5b1f1f485 100644 --- a/bin/darkwikid/src/main.rs +++ b/bin/darkwikid/src/main.rs @@ -336,8 +336,6 @@ impl Darkwiki { continue } - let edit = edit.trim(); - let doc_id = path_to_id(doc_path); // create new patch @@ -352,7 +350,7 @@ impl Darkwiki { // check the differences with LCS algorithm let local_patch_str = local_patch.to_string(); - let lcs = Lcs::new(&local_patch_str, edit); + let lcs = Lcs::new(&local_patch_str, &edit); let lcs_ops = lcs.ops(); // add the change ops to the new patch