diff --git a/src/gh_range_diff.rs b/src/gh_range_diff.rs index 7e55d6dc..1d7713fc 100644 --- a/src/gh_range_diff.rs +++ b/src/gh_range_diff.rs @@ -209,10 +209,8 @@ fn process_old_new( // Create the HTML buffer with a very rough approximation for the capacity let mut html: String = String::with_capacity(800 + old.files.len() * 100); - let a_oldbase = a_github_commit(owner, repo, oldbase); - let a_oldhead = a_github_commit(owner, repo, oldhead); - let a_newbase = a_github_commit(owner, repo, newbase); - let a_newhead = a_github_commit(owner, repo, newhead); + let a_compare_before = a_github_compare("compare-before", owner, repo, oldbase, oldhead); + let a_compare_after = a_github_compare("compare-after", owner, repo, newbase, newhead); // Write HTML header, style, ... writeln!( @@ -236,10 +234,16 @@ fn process_old_new( overflow-wrap: break-word; white-space: normal; }} - .commit {{ + .compare {{ text-decoration: none; color: unset; }} + .compare-before {{ + color: rgb(255, 93, 93); + }} + .compare-after {{ + color: rgb(55, 227, 55); + }} .diff-content {{ overflow-x: auto; }} @@ -297,6 +301,12 @@ fn process_old_new( a {{ color: #41a6ff; }} + .compare-before {{ + color: rgb(255, 93, 93); + }} + .compare-after {{ + color: rgb(88, 177, 88); + }} .filename-block {{ background-color: #5f8fe5; }} @@ -340,8 +350,8 @@ fn process_old_new(
-