Skip to content

Commit

Permalink
Diffs rendering improvements (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestTvarynka authored Apr 11, 2024
1 parent 2196f39 commit 5f32ffc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions public/styles/diff/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
//padding: 0.5em;
}

.diff-unchanged {
white-space: pre-wrap;
}

.diff-insert {
white-space: pre-wrap;
background-color: #97e0bd;
Expand Down
2 changes: 1 addition & 1 deletion src/diff/diff_viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn render_changes(diff: &DiffData) -> Vec<VNode> {
old_index,
len,
new_index: _,
} => text_spans(&old[*old_index..*old_index + *len], "", &mut line_number),
} => text_spans(&old[*old_index..*old_index + *len], "diff-unchanged", &mut line_number),
DiffOp::Delete {
old_index,
old_len,
Expand Down

0 comments on commit 5f32ffc

Please sign in to comment.