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

_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to