lilypond-devel
[Top][All Lists]
Advanced

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

Re: Remove CR LF from snippets using makelsr (issue 238520043 address@hi


From: Phil Holmes
Subject: Re: Remove CR LF from snippets using makelsr (issue 238520043 address@hidden)
Date: Sun, 24 May 2015 16:05:21 +0100

----- Original Message ----- From: <address@hidden>
To: <address@hidden>
Cc: <address@hidden>; <address@hidden>
Sent: Sunday, May 24, 2015 3:52 PM
Subject: Re: Remove CR LF from snippets using makelsr (issue 238520043 address@hidden)



https://codereview.appspot.com/238520043/diff/1/scripts/auxiliar/makelsr.py
File scripts/auxiliar/makelsr.py (right):

https://codereview.appspot.com/238520043/diff/1/scripts/auxiliar/makelsr.py#newcode254
scripts/auxiliar/makelsr.py:254: s = s.replace ("\r\n", "\n")
It would seem that this replacement should be done before other
line-related replacements.  Basically, right after reading s.  At least
I'm not sure that it does not affect the other replacements.

Most other replacements appear to be precompiled (look for
strip_white_spaces_re for an example).  It may make sense doing that
here as well.

https://codereview.appspot.com/238520043/

I took the view that, since the snippets are left with these artefacts _after_ all the other replacements have been completed, it would be best to remove them after all the other ones, too. I still believe that to be true.

I also considered that the other replacements required regular expressions, but this was so simple there was no point. After all, you can't have CR LF except at the end of the line. You can have whitespace in lots of other places.

FWIW I have tried it and it does fix the problem with the current LSR import and does not mess anything else up.

--
Phil Holmes



reply via email to

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