docs: newapi: Avoid table where every row has an cell with 'colspan'

The HTML standard requires that a table column must include at least one
row which defines it exclusively, thus having a table where all rows
unite it via 'colspan' is illegal.

Modify the enum value generator to always output the description field
even when it's empty rather than uniting it, as in case when each value
doesn't have a description the generated document would violate the
standard.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2024-02-29 14:11:57 +01:00
parent 47a8ff9979
commit 6f4485a453

View File

@ -317,9 +317,9 @@
<tr>
<td><a id="{@name}"><xsl:value-of select="@name"/></a></td>
<td><xsl:text> = </xsl:text></td>
<td class="enumvalue"><xsl:call-template name="enumvalue"/></td>
<xsl:choose>
<xsl:when test="@info != ''">
<td class="enumvalue"><xsl:call-template name="enumvalue"/></td>
<td>
<div class="comment">
<xsl:call-template name="dumptext">
@ -329,7 +329,7 @@
</td>
</xsl:when>
<xsl:otherwise>
<td colspan="2" class="enumvalue"><xsl:call-template name="enumvalue"/></td>
<td><xsl:comment> </xsl:comment></td>
</xsl:otherwise>
</xsl:choose>
</tr>