diff --git a/src/compare/compare.rs b/src/compare/compare.rs index 4ba45199..5d6cd460 100644 --- a/src/compare/compare.rs +++ b/src/compare/compare.rs @@ -14,7 +14,9 @@ use crate::LocalFileAccessInterface; pub fn run_anonymous_compare>( org_contents: P, ) -> Result<(), Box> { - let org_contents = org_contents.as_ref(); + // TODO: This is a work-around to pretend that dos line endings do not exist. It would be better to handle the difference in line endings. + let org_contents = org_contents.as_ref().replace("\r\n", "\n"); + let org_contents = org_contents.as_str(); eprintln!("Using emacs version: {}", get_emacs_version()?.trim()); eprintln!("Using org-mode version: {}", get_org_mode_version()?.trim()); let rust_parsed = parse(org_contents)?; @@ -44,6 +46,8 @@ pub fn run_compare_on_file>(org_path: P) -> Result<(), Box