Fix novel_regions_after_unchanged to always append the last region

This is the correct thing to do (and consistent with
novel_regions_before_unchanged), although I haven't found any examples
where it affects the results.
add_libdifftastic
Wilfred Hughes 2022-09-02 16:37:53 +07:00
parent d9fb75981e
commit 8860fabf19
1 changed files with 4 additions and 0 deletions

@ -396,6 +396,10 @@ fn novel_regions_before_unchanged<'a>(
}
}
if let Some(region) = region {
regions.push(region);
}
regions
.into_iter()
.filter(|r| !r.is_empty())