fix(petal): keep line numbers out of tab stops in file view
2 files changed, -2/+10
petal/petal.c
@@ -248,7 +248,7 @@ filepage(const char *path, const git_tree_entry *e) for (i = 0, n = 1; i < len; i += l + 1, n++) { nl = memchr(s + i, '\n', len - i); l = nl ? (size_t)(nl - s) - i : len - i;- printf("<a id=\"l%zu\" href=\"#l%zu\">%4zu</a> ",+ printf("<a id=\"l%zu\" href=\"#l%zu\">%zu</a>", n, n, n); xmlencoden(s + i, l); putchar('\n');
petal/style.css
@@ -237,9 +237,17 @@ pre { overflow-x: auto; } +.blob {+ position: relative;+ padding-left: 7ch;+}+ .blob a {+ position: absolute;+ left: 0;+ width: 5ch;+ text-align: right; color: var(--a4);- margin-right: 1ch; user-select: none; }