diff options
author | Eric Wong <e@80x24.org> | 2020-01-04 09:16:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-01-04 09:35:28 +0000 |
commit | 9c6dbb636ae2738c4b5d5b96752b7433be0d7b62 (patch) | |
tree | 8d7082521c51a2e64ea45237b945404cf4d72fe7 | |
parent | 2b189b48dee50f43042ba0f23ff374f62413fb2e (diff) | |
download | public-inbox-9c6dbb636ae2738c4b5d5b96752b7433be0d7b62.tar.gz |
Viewing a CSS-less page in a browser which underlines links can show a long line of underscores after diffstats. Not all browsers underline links by default, though.
-rw-r--r-- | lib/PublicInbox/ViewDiff.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm index 4669e874..4d72eb48 100644 --- a/lib/PublicInbox/ViewDiff.pm +++ b/lib/PublicInbox/ViewDiff.pm @@ -104,8 +104,9 @@ sub anchor0 ($$$$$) { if (my $attr = to_attr($ctx->{-apfx}.$fn)) { $ctx->{-anchors}->{$attr} = 1; + my $spaces = ($orig =~ s/( +)\z//) ? $1 : ''; $$dst .= " <a\nid=i$attr\nhref=#$attr>" . - ascii_html($orig) . '</a>'. + ascii_html($orig) . '</a>' . $spaces . to_html($linkify, $rest); return 1; } |