- html("<td class='lines'><pre><code>");
- html_ntxt(cp, cpend - cp);
- html("</code></pre></td></tr>\n");
+ unsigned long lineno = ent->lno;
+ while (lineno < ent->lno + ent->num_lines)
+ htmlf(numberfmt, ++lineno);
+}
+
+static void emit_blame_entry_line_background(struct blame_scoreboard *sb,
+ struct blame_entry *ent)
+{
+ 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;
+ }
+
+ for (len = 0; len < maxlen - 1; len++)
+ html(" ");