Kaynağa Gözat

bin/darkwikid: remove calling trim() on documents

ghassmo 4 yıl önce
ebeveyn
işleme
7604b7743b
1 değiştirilmiş dosya ile 1 ekleme ve 3 silme
  1. 1 3
      bin/darkwikid/src/main.rs

+ 1 - 3
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