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.
if (my $attr = to_attr($ctx->{-apfx}.$fn)) {
$ctx->{-anchors}->{$attr} = 1;
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>" .
$$dst .= " <a\nid=i$attr\nhref=#$attr>" .
- ascii_html($orig) . '</a>'.
+ ascii_html($orig) . '</a>' . $spaces .
to_html($linkify, $rest);
return 1;
}
to_html($linkify, $rest);
return 1;
}