[BoostBook] Support for SVN fixed-length $Date$ keyword
Robert Kawulak <[email protected]> Sat, 13 Jul 2013 01:37:05 +0200
| Newsgroups | gmane.comp.lib.boost.documentation |
|---|---|
| Message-ID | <!&!AAAAAAAAAAAYAAAAAAAAAP2My3EH4FhKr+L7Y/[email protected]> |
Hi, I've added support for SVN fixed-length $Date$ keyword (explained at the bottom of http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html). Is it OK to apply the changes? Best regards, Robert _______________________________________________ Boost-docs mailing list [email protected] http://lists.boost.org/mailman/listinfo.cgi/boost-docs
svn-fixed-length-date.patch
(application/octet-stream, 1.9 KB)
Index: tools/boostbook/xsl/html-base.xsl
===================================================================
--- tools/boostbook/xsl/html-base.xsl (revision 84927)
+++ tools/boostbook/xsl/html-base.xsl (working copy)
@@ -142,7 +142,7 @@
<!-- Remove the "$Date: " -->
<xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
+ select="substring-after($text, ' ')"/>
<!-- Grab the year -->
<xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
@@ -184,8 +184,10 @@
</xsl:choose>
</xsl:variable>
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' ', $timezone)"/>
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year)"/>
+ <xsl:if test="$time != ''">
+ <xsl:value-of select="concat(' at ', $time, ' ', $timezone)"/>
+ </xsl:if>
</xsl:template>
<!-- Footer Copyright -->
Index: tools/boostbook/xsl/html-help.xsl
===================================================================
--- tools/boostbook/xsl/html-help.xsl (revision 84927)
+++ tools/boostbook/xsl/html-help.xsl (working copy)
@@ -80,7 +80,7 @@
<!-- Remove the "$Date: " -->
<xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
+ select="substring-after($text, ' ')"/>
<!-- Grab the year -->
<xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
@@ -122,8 +122,10 @@
</xsl:choose>
</xsl:variable>
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' ', $timezone)"/>
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year)"/>
+ <xsl:if test="$time != ''">
+ <xsl:value-of select="concat(' at ', $time, ' ', $timezone)"/>
+ </xsl:if>
</xsl:template>
<!-- We don't want refentry's to show up in the TOC because they