+sub anchor0 ($$$$$) {
+ my ($dst, $anchors, $linkify, $fn, $rest) = @_;
+ if (my $attr = to_attr($fn)) {
+ $anchors->{$attr} = 1;
+ $$dst .= " <a\nhref=#$attr>" .
+ ascii_html($fn) . '</a>'.
+ to_html($linkify, $rest);
+ return 1;
+ }
+ undef;
+}
+
+sub anchor1 ($$$$$) {
+ my ($dst, $anchors, $linkify, $pb, $s) = @_;
+ my $attr = to_attr($pb) or return;
+ my $line = to_html($linkify, $s);
+
+ if (delete $anchors->{$attr} && $line =~ s/^diff //) {
+ $$dst .= "<a\nhref=#ds\nid=$attr>diff</a> ".$line;
+ return 1;
+ }
+ undef
+}
+