stagit

make hunk line itself a link

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 1d14b5f parent: a682bdb
1 files changed, 2 insertions(+), 2 deletions(-)
Mstagit.c+2-2
M · stagit.c +2, -2
 1@@ -409,9 +409,9 @@ printshowfile(struct commitinfo *ci)
 2 			if (git_patch_get_hunk(&hunk, &nhunklines, patch, j))
 3 				break;
 4 
 5-			fputs("<span class=\"h\">", fp);
 6+			fprintf(fp, "<a href=\"#h%zu\" id=\"h%zu\" class=\"h\">", j, j);
 7 			xmlencode(fp, hunk->header, hunk->header_len);
 8-			fputs("</span>", fp);
 9+			fputs("</a>", fp);
10 
11 			for (k = 0; ; k++) {
12 				if (git_patch_get_line_in_hunk(&line, patch, j, k))