git-delta-lib 0.0.1

Not ready for use: use crate git-delta for the application
Documentation
diff --cc src/paint.rs
index 79b44db1,0f429d5c..00000000
--- a/src/paint.rs
+++ b/src/paint.rs
@@@ -387,30 -457,36 +387,88 @@@ impl<'p> Painter<'p> 
      ) -> (Option<BgFillMethod>, Style) {
          // style:          for right fill if line contains no emph sections
          // non_emph_style: for right fill if line contains emph sections
++<<<<<<< HEAD
 +        let (style, non_emph_style) = match state {
 +            State::HunkMinus(None) | State::HunkMinusWrapped => {
 +                (config.minus_style, config.minus_non_emph_style)
 +            }
 +            State::HunkZero | State::HunkZeroWrapped => (config.zero_style, config.zero_style),
 +            State::HunkPlus(None) | State::HunkPlusWrapped => {
 +                (config.plus_style, config.plus_non_emph_style)
 +            }
 +            State::HunkMinus(Some(_)) | State::HunkPlus(Some(_)) => {
 +                let style = if !diff_sections.is_empty() {
 +                    diff_sections[diff_sections.len() - 1].0
++||||||| parent of 4d4b19ca (Always use non-emph style for right fill)
++        let (style, non_emph_style) = match state {
++            State::HunkMinus(None) | State::HunkMinusWrapped => {
++                (config.minus_style, config.minus_non_emph_style)
++            }
++            State::HunkMinus(Some(raw_line)) => {
++                // TODO: This is the second time we are parsing the ANSI sequences
++                if let Some(ansi_term_style) = ansi::parse_first_style(raw_line) {
++                    let style = Style {
++                        ansi_term_style,
++                        ..Style::new()
++                    };
++                    (style, style)
++                } else {
++                    (config.minus_style, config.minus_non_emph_style)
++                }
++            }
++            State::HunkZero | State::HunkZeroWrapped => (config.zero_style, config.zero_style),
++            State::HunkPlus(None) | State::HunkPlusWrapped => {
++                (config.plus_style, config.plus_non_emph_style)
++            }
++            State::HunkPlus(Some(raw_line)) => {
++                // TODO: This is the second time we are parsing the ANSI sequences
++                if let Some(ansi_term_style) = ansi::parse_first_style(raw_line) {
++                    let style = Style {
++                        ansi_term_style,
++                        ..Style::new()
++                    };
++                    (style, style)
++=======
+         let non_emph_style = match state {
+             State::HunkMinus(None) | State::HunkMinusWrapped => config.minus_non_emph_style,
+             State::HunkMinus(Some(raw_line)) => {
+                 // TODO: This is the second time we are parsing the ANSI sequences
+                 if let Some(ansi_term_style) = ansi::parse_first_style(raw_line) {
+                     Style {
+                         ansi_term_style,
+                         ..Style::new()
+                     }
+                 } else {
+                     config.minus_non_emph_style
+                 }
+             }
+             State::HunkZero | State::HunkZeroWrapped => config.zero_style,
+             State::HunkPlus(None) | State::HunkPlusWrapped => config.plus_non_emph_style,
+             State::HunkPlus(Some(raw_line)) => {
+                 // TODO: This is the second time we are parsing the ANSI sequences
+                 if let Some(ansi_term_style) = ansi::parse_first_style(raw_line) {
+                     Style {
+                         ansi_term_style,
+                         ..Style::new()
+                     }
++>>>>>>> 4d4b19ca (Always use non-emph style for right fill)
                  } else {
++<<<<<<< HEAD
 +                    config.null_style
 +                };
 +                (style, style)
++||||||| parent of 4d4b19ca (Always use non-emph style for right fill)
++                    (config.plus_style, config.plus_non_emph_style)
++                }
++=======
+                     config.plus_non_emph_style
+                 }
++>>>>>>> 4d4b19ca (Always use non-emph style for right fill)
              }
-             State::Blame(_, _) => (diff_sections[0].0, diff_sections[0].0),
-             _ => (config.null_style, config.null_style),
-         };
-         let fill_style = if style_sections_contain_more_than_one_style(diff_sections) {
-             non_emph_style // line contains an emph section
-         } else {
-             style
+             State::Blame(_, _) => diff_sections[0].0,
+             _ => config.null_style,
          };
+         let fill_style = non_emph_style;
  
          match (
              fill_style.get_background_color().is_some(),