Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77960 - website/public_html/beta/site-tools/boost_site
From: dnljms_at_[hidden]
Date: 2012-04-13 18:10:16


Author: danieljames
Date: 2012-04-13 18:10:15 EDT (Fri, 13 Apr 2012)
New Revision: 77960
URL: http://svn.boost.org/trac/boost/changeset/77960

Log:
Website: Strip trailing spaces from xml fragments.
Text files modified:
   website/public_html/beta/site-tools/boost_site/util.py | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: website/public_html/beta/site-tools/boost_site/util.py
==============================================================================
--- website/public_html/beta/site-tools/boost_site/util.py (original)
+++ website/public_html/beta/site-tools/boost_site/util.py 2012-04-13 18:10:15 EDT (Fri, 13 Apr 2012)
@@ -3,7 +3,7 @@
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
-import urlparse
+import urlparse, re
 
 def htmlencode(text):
     return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&rt;')
@@ -15,7 +15,9 @@
     Because 'toxml' doesn't work:
     http://bugs.python.org/issue9883
     """
- return ''.join(x.toxml('utf-8').decode('utf-8') for x in fragment.childNodes)
+ x = ''.join(x.toxml('utf-8').decode('utf-8') for x in fragment.childNodes)
+ x = re.sub(r' +$', '', x, flags = re.M)
+ return x
 
 def base_links(node, base_link):
     transform_links(node, lambda x: urlparse.urljoin(base_link,x))


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