Skip to content

Commit

Permalink
CLI: Color entire line in Diffs (astral-sh#10183)
Browse files Browse the repository at this point in the history
  • Loading branch information
senadev42 authored Mar 1, 2024
1 parent 8b5daae commit c59d82a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_linter/src/source_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ impl std::fmt::Display for CodeDiff<'_> {
for change in hunk.iter_changes() {
match change.tag() {
ChangeTag::Equal => write!(f, " {}", change.value())?,
ChangeTag::Delete => write!(f, "{}{}", "-".red(), change.value())?,
ChangeTag::Insert => write!(f, "{}{}", "+".green(), change.value())?,
ChangeTag::Delete => write!(f, "{}{}", "-".red(), change.value().red())?,
ChangeTag::Insert => write!(f, "{}{}", "+".green(), change.value().green())?,
}

if !self.diff.newline_terminated() {
Expand Down

0 comments on commit c59d82a

Please sign in to comment.