Skip to content

Commit

Permalink
fix: \r shouldn't be visualized like a newline in Combined renderer
Browse files Browse the repository at this point in the history
#34

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
  • Loading branch information
jfcherng committed Aug 10, 2020
1 parent cb2bed2 commit 35a2502
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion example/diff-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
.diff-wrapper.diff.diff-html {
white-space: pre-wrap;
}
.diff-wrapper.diff.diff-html.diff-combined .change.change-rep .rep {
white-space: normal;
}
.diff-wrapper.diff.diff-html .change.change-eq .old,
.diff-wrapper.diff.diff-html .change.change-eq .new {
background: #fff;
Expand All @@ -88,7 +91,9 @@
.diff-wrapper.diff.diff-html .change .rep {
background: #fef6d9;
}
.diff-wrapper.diff.diff-html .change .old.none, .diff-wrapper.diff.diff-html .change .new.none, .diff-wrapper.diff.diff-html .change .rep.none {
.diff-wrapper.diff.diff-html .change .old.none,
.diff-wrapper.diff.diff-html .change .new.none,
.diff-wrapper.diff.diff-html .change .rep.none {
background: transparent;
cursor: not-allowed;
}
Expand Down
9 changes: 9 additions & 0 deletions example/diff-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ $diff-bg-color-none-block-alternative: mix($diff-bg-color, $diff-table-sidebar-c
&.diff-html {
white-space: pre-wrap;

&.diff-combined {
.change.change-rep {
.rep {
// fixes https://github.com/jfcherng/php-diff/issues/34#issuecomment-671404456
white-space: normal;
}
}
}

.change {
&.change-eq {
.old,
Expand Down

0 comments on commit 35a2502

Please sign in to comment.