- char *id_str = fmt("%s#%s", is_null_sha1(old_file->sha1)?"HEAD":sha1_to_hex(old_rev_sha1), lineno_str);
- html("<td class='lineno'><a class='no' href='");
- html(cgit_fileurl(ctx.repo->url, "tree", old_file->path, id_str));
- htmlf("' id='%s' name='%s'>%s</a>", lineno_str, lineno_str, lineno_str + 1);
+ char *id_str = fmt("id=%s#%s", is_null_oid(&old_file->oid)?"HEAD":oid_to_hex(old_rev_oid), lineno_str);
+ char *fileurl = cgit_fileurl(ctx.repo->url, "tree", old_file->path, id_str);
+ html("<td class='lineno'><a href='");
+ html(fileurl);
+ htmlf("' id='%s'>%s</a>", lineno_str, lineno_str + 1);