Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-05-08 18:07:29


Author: danieljames
Date: 2008-05-08 18:07:28 EDT (Thu, 08 May 2008)
New Revision: 45234
URL: http://svn.boost.org/trac/boost/changeset/45234

Log:
Replace spaces in generated file names with underscores, and replace multiple consecutive underscores with a single underscore. Fixes #1705
Text files modified:
   trunk/tools/boostbook/xsl/chunk-common.xsl | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/tools/boostbook/xsl/chunk-common.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/chunk-common.xsl (original)
+++ trunk/tools/boostbook/xsl/chunk-common.xsl 2008-05-08 18:07:28 EDT (Thu, 08 May 2008)
@@ -28,7 +28,7 @@
     <xsl:choose>
         <xsl:when test="not($recursive)">
             <!-- translate dots into directory separators, and replace illegal file path characters with underscores -->
- <xsl:value-of select="translate( $basename, '.&lt;&gt;\:*?&quot;|', '/_______' )"/>
+ <xsl:value-of select="translate(normalize-space(translate($basename, '._&lt;&gt;\:*?&quot;|', '/ ' )), ' ', '_')"/>
             <xsl:value-of select="$html.ext"/>
         </xsl:when>
         <xsl:otherwise>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk