From 000f193e5c2210be33cbe4049073e9e012d79bb4 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 27 May 2020 20:10:34 -0400 Subject: Bug fix: fix spurious application of non-emph styles --- src/edits.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/edits.rs') diff --git a/src/edits.rs b/src/edits.rs index f19d25b0..7b6e4674 100644 --- a/src/edits.rs +++ b/src/edits.rs @@ -100,9 +100,11 @@ fn tokenize(line: &str) -> Vec<&str> { } /// Use alignment to "annotate" minus and plus lines. An "annotated" line is a sequence of -/// (s: &str, a: Annotation) pairs, where the &strs reference the memory +/// (a: Annotation, s: &str) pairs, where the &strs reference the memory /// of the original line and their concatenation equals the line. -// TODO: Coalesce runs of the same operation. +// This function doesn't return "coalesced" annotations: i.e. they're often are runs of consecutive +// occurrences of the same operation. Since it is returning &strs pointing into the memory of the +// original line, it's not possible to coalesce them in this function. fn annotate<'a, Annotation>( alignment: align::Alignment<'a>, noop_deletion: Annotation, -- cgit v1.2.3