From 0c4340ab7bab11e93bc5bbd3bf02096e3658fe3d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 14 Aug 2026 12:02:52 -1000 Subject: Size the ssdiff spacer with the cell --- assets/cgit.css | 5 +---- source/ui-ssdiff.c | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/cgit.css b/assets/cgit.css index dbf76e9..11d416f 100644 --- a/assets/cgit.css +++ b/assets/cgit.css @@ -1356,10 +1356,7 @@ div#cgit table.ssdiff td.foot { div#cgit table.ssdiff td.space { border: none; -} - -div#cgit table.ssdiff td.space div { - min-height: 3em; + height: 3em; } /* The breakpoints only hide chrome or restack, sizes never change. */ diff --git a/source/ui-ssdiff.c b/source/ui-ssdiff.c index a58766a..7f3d194 100644 --- a/source/ui-ssdiff.c +++ b/source/ui-ssdiff.c @@ -181,8 +181,8 @@ static void print_lineno_cell(struct diff_filespec *file, anchor = cgit_fmt("n%d", line_no); rev_hex = is_null_oid(&file->oid) ? "HEAD" : oid_to_hex(rev); query = cgit_fmt("id=%s#%s", rev_hex, anchor); - // The path is repository content, so percent-encode it before it lands - // raw in the href. + // The path is repository content, so percent-encode it so that the url + // stays a url whatever bytes the path holds. if (file->path) strbuf_add_percentencode(&path, file->path, 0); fileurl = cgit_fileurl(ctx.repo->url, "tree", path.buf, query); @@ -427,7 +427,7 @@ void cgit_ssdiff_header_begin(void) { current_old_line = -1; current_new_line = -1; - html("
"); + html("\n"); html(""); } -- cgit v2.8.0