commit: 4ad0fdff94a8e51fa2be94eff28357d962c8063a Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sun Oct 22 08:39:05 2023 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sun Oct 22 11:35:52 2023 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=4ad0fdff
devbook.xsl: Work around a bug in tidy tidy reports spurious warnings due to a bug in version tidy-html5-5.8.0: https://github.com/htacg/tidy-html5/issues/1012 line 128 column 1 - Warning: <ol> attribute "type" not allowed for HTML5 Work around it by using "ol style" instead of "ol type". Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> devbook.xsl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/devbook.xsl b/devbook.xsl index 426b2fd..f4ecc3e 100644 --- a/devbook.xsl +++ b/devbook.xsl @@ -188,7 +188,17 @@ <xsl:template match="ol"> <ol> <xsl:if test="@type"> - <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute> + <xsl:attribute name="style"> + <xsl:text>list-style-type:</xsl:text> + <xsl:choose> + <xsl:when test="@type = '1'">decimal</xsl:when> + <xsl:when test="@type = 'A'">upper-alpha</xsl:when> + <xsl:when test="@type = 'a'">lower-alpha</xsl:when> + <xsl:when test="@type = 'I'">upper-roman</xsl:when> + <xsl:when test="@type = 'i'">lower-roman</xsl:when> + <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise> + </xsl:choose> + </xsl:attribute> </xsl:if> <xsl:apply-templates/> </ol>