aboutsummaryrefslogtreecommitdiffstats
path: root/stagit.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2016-01-05 21:42:10 +0100
committerHiltjo Posthuma <[email protected]>2016-01-05 21:42:10 +0100
commita6b29cbbd97fbc2b297d55675422d3b2207b5791 (patch)
tree99ff221917489c8897c38b9d827d49dd46f3c7f0 /stagit.c
parent99a8b8a2963a1dec98dd28f86dccc83d41130c60 (diff)
downloadstagit-a6b29cbbd97fbc2b297d55675422d3b2207b5791.tar.gz
stagit-a6b29cbbd97fbc2b297d55675422d3b2207b5791.zip
make hunk line itself a link
Diffstat (limited to '')
-rw-r--r--stagit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stagit.c b/stagit.c
index aad7386..22b639e 100644
--- a/stagit.c
+++ b/stagit.c
@@ -409,9 +409,9 @@ printshowfile(struct commitinfo *ci)
if (git_patch_get_hunk(&hunk, &nhunklines, patch, j))
break;
- fputs("<span class=\"h\">", fp);
+ fprintf(fp, "<a href=\"#h%zu\" id=\"h%zu\" class=\"h\">", j, j);
xmlencode(fp, hunk->header, hunk->header_len);
- fputs("</span>", fp);
+ fputs("</a>", fp);
for (k = 0; ; k++) {
if (git_patch_get_line_in_hunk(&line, patch, j, k))