aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-10-22 10:39:05 +0200
committerUlrich Müller <ulm@gentoo.org>2023-10-22 13:35:52 +0200
commit4ad0fdff94a8e51fa2be94eff28357d962c8063a (patch)
treea0fd91d81b6af7ba09cc5d06ce4e89d1f895abd2
parentgeneral-concepts/copyright-policy: Reformat the General guideline section (diff)
downloaddevmanual-4ad0fdff94a8e51fa2be94eff28357d962c8063a.tar.gz
devmanual-4ad0fdff94a8e51fa2be94eff28357d962c8063a.tar.bz2
devmanual-4ad0fdff94a8e51fa2be94eff28357d962c8063a.zip
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@gentoo.org>
-rw-r--r--devbook.xsl12
1 files changed, 11 insertions, 1 deletions
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>