URI: 
       Simplify diff markup - stagit-gopher - A git gopher frontend. (mirror)
  HTML git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
   DIR LICENSE
       ---
   DIR commit b634cfd86042f303dae68c2805810c7a0f9614c5
   DIR parent 1363b8b51e4e2e75e56cdc022eb1ab50d15dd84d
  HTML Author: Eivind Uggedal <eivind@uggedal.com>
       Date:   Wed,  9 Dec 2015 09:43:20 +0000
       
       Simplify diff markup
       
       Remove <span> for inserted/deleted lines and use
       the <a> for coloring.
       
       Diffstat:
         M style.css                           |      10 +++-------
         M urmoms.c                            |       6 +++---
       
       2 files changed, 6 insertions(+), 10 deletions(-)
       ---
   DIR diff --git 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;
        }
   DIR diff --git 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, "<span class=\"i\"><a href=\"#h%zu-%zu\" id=\"h%zu-%zu\">+",
       +                                        fprintf(fp, "<a href=\"#h%zu-%zu\" id=\"h%zu-%zu\" class=\"i\">+",
                                                        j, k, j, k);
                                        else if (line->new_lineno == -1)
       -                                        fprintf(fp, "<span class=\"d\"><a href=\"#h%zu-%zu\" id=\"h%zu-%zu\">-",
       +                                        fprintf(fp, "<a href=\"#h%zu-%zu\" id=\"h%zu-%zu\" class=\"d\">-",
                                                        j, k, j, k);
                                        else
                                                fputc(' ', fp);
                                        xmlencode(fp, line->content, line->content_len);
                                        if (line->old_lineno == -1 || line->new_lineno == -1)
       -                                        fputs("</a></span>", fp);
       +                                        fputs("</a>", fp);
                                }
                        }
                        git_patch_free(patch);