diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-05-27 20:10:34 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-05-27 20:14:19 -0400 |
commit | 000f193e5c2210be33cbe4049073e9e012d79bb4 (patch) | |
tree | c2edb75a6dd235dfa12d5dc1af5a0f1508d668c3 /src/edits.rs | |
parent | 7e8b6b4108b6ad400350c55e34eee656a584ec7c (diff) |
Bug fix: fix spurious application of non-emph styles
Diffstat (limited to 'src/edits.rs')
-rw-r--r-- | src/edits.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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, |