[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 11/11] docs/parse-support-md: Identical [*]: only use extra table cell if necessary
Otherwise paste [*] right onto the end. I'm not sure if this is desirable. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- v3: New patch --- docs/parse-support-md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/parse-support-md b/docs/parse-support-md index 38c8326..f91adca 100755 --- a/docs/parse-support-md +++ b/docs/parse-support-md @@ -358,18 +358,26 @@ sub write_output_row ($) { my $colspan = $sectnode->{RealSect}{ColSpan}[$i]; my $nextcell = ''; + my $suffix = $sectnode->{RealSect}{AlwaysSuffix}; if (!defined $colspan) { # first row of this RealSect $colspan= ' colspan="2"'; if ($sectnode->{RealSect}{HasText}[$i] && $st && $sectnode->{RealSect}{Anchor}) { my $rows = $sectnode->{RealSect}{Rows}; - $nextcell = sprintf '<td rowspan=%d>', $rows; - my @nce = ($rows>1 ? ('}') : ('')) x $rows; - $nce[floor(($rows-1)/2)] .= sprintf '<a href="%s#%s">[*]</a>', + my $asterisk = sprintf '<a href="%s#%s">[*]</a>', $version_urls[$i], $sectnode->{RealSect}{Anchor}; - $nextcell .= join '<br>', @nce; - $nextcell .= '</td>'; - $colspan = ''; + if ($rows > 1) { + $nextcell = sprintf '<td rowspan="%d">', $rows; + my @nce = ($rows>1 ? ('}') : ('')) x $rows; + $nce[floor(($rows-1)/2)] .= $asterisk; + $nextcell .= join '<br>', @nce; + $nextcell .= '</td>'; + $suffix = '[*]'; + $sectnode->{RealSect}{AlwaysSuffix} = $suffix; + $colspan = ''; + } else { + $suffix = $asterisk; + } } $sectnode->{RealSect}{ColSpan}[$i] = $colspan; } @@ -383,6 +391,7 @@ sub write_output_row ($) { } o(escapeHTML($st)); o($end_a); + o($suffix // ''); o('</td>'); o($nextcell); } -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |