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