docs/parse-support-md: internals: Introduce docref_a
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 12 Apr 2018 17:06:45 +0000 (18:06 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Apr 2018 12:58:42 +0000 (13:58 +0100)
No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
docs/parse-support-md

index decda33fb6929660c575cae6e4afd203820bb910..5bf840520662d13abfac0be1c6ff097aecc23dd6 100755 (executable)
@@ -318,6 +318,12 @@ sub o { print @_ or die $!; }
 
 our @pending_headings;
 
+sub docref_a ($$) {
+    my ($i, $realsect) = @_;
+    return sprintf '<a href="%s#%s">',
+        $version_urls[$i], $realsect->{Anchor};
+}
+
 sub write_output_row ($) {
     my ($sectnode) = @_;
 #    print STDERR 'WOR ', Dumper($d, $sectnode);
@@ -364,8 +370,8 @@ sub write_output_row ($) {
                 && $sectnode->{RealSect}{Anchor}) {
                 my $rows = $sectnode->{RealSect}{Rows};
                 $nextcell = sprintf '<td rowspan=%d>', $rows;
-                $nextcell .= sprintf '<a href="%s#%s">[*]</a>',
-                    $version_urls[$i], $sectnode->{RealSect}{Anchor};
+                $nextcell .= docref_a $i, $sectnode->{RealSect};
+                $nextcell .= '[*]</a>';
                 $nextcell .= '</td>';
                 $colspan = '';
             }