From b634cfd86042f303dae68c2805810c7a0f9614c5 Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Wed, 9 Dec 2015 09:43:20 +0000 Subject: [PATCH] Simplify diff markup Remove for inserted/deleted lines and use the for coloring. --- style.css | 10 +++------- urmoms.c | 6 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/style.css b/style.css index d7de757..2823efb 100644 --- a/style.css +++ b/style.css @@ -50,18 +50,14 @@ pre .h { color: darkcyan; } -pre .i { +pre a.i { color: green; } -pre .d { +pre a.d { color: red; } -pre span a { - color: inherit; -} - -pre span a:hover { +pre a.i:hover, pre a.d:hover { text-decoration: none; } diff --git a/urmoms.c b/urmoms.c index 01aebb1..8167d0f 100644 --- a/urmoms.c +++ b/urmoms.c @@ -333,16 +333,16 @@ printshowfile(struct commitinfo *ci) if (git_patch_get_line_in_hunk(&line, patch, j, k)) break; if (line->old_lineno == -1) - fprintf(fp, "+", + fprintf(fp, "+", j, k, j, k); else if (line->new_lineno == -1) - fprintf(fp, "-", + fprintf(fp, "-", j, k, j, k); else fputc(' ', fp); xmlencode(fp, line->content, line->content_len); if (line->old_lineno == -1 || line->new_lineno == -1) - fputs("", fp); + fputs("", fp); } } git_patch_free(patch); -- libgit2 1.1.1