Otherwise paste [*] right onto the end.

I'm not sure if this is desirable.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to