lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build: fix 1167. (issue1929041)


From: mtsolo
Subject: Build: fix 1167. (issue1929041)
Date: Mon, 09 Aug 2010 15:39:55 +0000


http://codereview.appspot.com/1929041/diff/1/2
File python/auxiliar/postprocess_html.py (right):

http://codereview.appspot.com/1929041/diff/1/2#newcode353
python/auxiliar/postprocess_html.py:353:
'href=\"../../../website/development.html\"')
s.replace does a greedy search for strings and replaces them.
For your purposes s.replace looks fine.  To make it gel w/ the re stuff
in the rest of the file, you can use re.sub, as in the
unfortuantely-line-wrapped snippet below (the three long statements to
the python interpreter should not have a newline):

import re
a = re.compile('href=\"../..//Documentation/web/manuals.html\"')
z = 'foo href=\"../..//Documentation/web/manuals.html\" bar
href=\"../..//Documentation/web/manuals.html\"'
re.sub(a,'href=\"../../../website/development.html\"',z)
'foo href="../../../website/development.html" bar
href="../../../website/development.html"'

http://codereview.appspot.com/1929041/show



reply via email to

[Prev in Thread] Current Thread [Next in Thread]