1
0
Fork 0

Add test case for rendering short durations, use non-breaking spaces

main
Ainsley Ellis 2025-06-01 20:54:42 -04:00
parent f43c092914
commit d8b3724c8c
1 changed files with 8 additions and 10 deletions

View File

@ -55,17 +55,15 @@
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="./duration/start/text()" /> <xsl:value-of select="./duration/start/text()" />
</time> </time>
to
<xsl:choose> <xsl:choose>
<xsl:when test="./duration/end"> <xsl:when test="./duration/start[@datetime] != ./duration/end[@datetime]">&#160;to&#160;<time>
<time>
<xsl:attribute name="datetime"> <xsl:attribute name="datetime">
<xsl:value-of select="./duration/end[@datetime]" /> <xsl:value-of select="./duration/end[@datetime]" />
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="./duration/end/text()" /> <xsl:value-of select="./duration/end/text()" />
</time> </time>
</xsl:when> </xsl:when>
<xsl:otherwise>Present</xsl:otherwise> <xsl:when test="not(boolean(./duration/end))">&#160;to&#160;Present</xsl:when>
</xsl:choose> </xsl:choose>
</p> </p>
</header> </header>