diff options
author | Dan Davison <dandavison7@gmail.com> | 2019-07-30 12:10:17 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2019-08-06 22:50:31 -0700 |
commit | 41c43314da3cee8bbaa98c1deff0e7c45646b28d (patch) | |
tree | 4202e4bcebd74cee1ed52e27f1a7860fec77a91a /src/paint.rs | |
parent | 1bfd17539cba33589e07827f9e577d3d9ced018e (diff) |
Use Needleman-Wunsch / Wagner-Fischer algorithm
Diffstat (limited to 'src/paint.rs')
-rw-r--r-- | src/paint.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/paint.rs b/src/paint.rs index 02e2a285..4fcb593b 100644 --- a/src/paint.rs +++ b/src/paint.rs @@ -80,12 +80,14 @@ impl<'a> Painter<'a> { syntax_style_sections: Vec<Vec<(Style, &str)>>, diff_style_sections: Vec<Vec<(StyleModifier, &str)>>, ) { + use std::fmt::Write; for (syntax_sections, diff_sections) in syntax_style_sections.iter().zip(diff_style_sections.iter()) { for (style, text) in superimpose_style_sections(syntax_sections, diff_sections) { paint_text(&text, style, output_buffer).unwrap(); } + write!(output_buffer, "\n").unwrap(); } } |