- const char *cp, *cpend;
-
- cp = blame_nth_line(sb, ent->lno);
- cpend = blame_nth_line(sb, ent->lno + ent->num_lines);
-
- html_ntxt(cp, cpend - cp);
-}
-
-static void emit_blame_entry(struct blame_scoreboard *sb,
- struct blame_entry *ent)
-{
- html("<tr><td class='sha1 hashes'>");
- emit_blame_entry_hash(ent);
- html("</td>\n");
-
- if (ctx.cfg.enable_tree_linenumbers) {
- html("<td class='linenumbers'><pre>");
- emit_blame_entry_linenumber(ent);
- html("</pre></td>\n");
+ unsigned long line;
+ size_t len, maxlen = 2;
+ const char* pos, *endpos;
+
+ for (line = ent->lno; line < ent->lno + ent->num_lines; line++) {
+ html("\n");
+ pos = blame_nth_line(sb, line);
+ endpos = blame_nth_line(sb, line + 1);
+ len = 0;
+ while (pos < endpos) {
+ len++;
+ if (*pos++ == '\t')
+ len = (len + 7) & ~7;
+ }
+ if (len > maxlen)
+ maxlen = len;