2005-04-06 Jan Nieuwenhuizen <jan.nieuwenhuizen@aspiratie.nl>
+ * scripts/lilypond-book.py (split_options): Bugfix. Small code
+ formatting cleanups.
+
* mf/GNUmakefile: Rewrite $addprefix, $addsuffix using % short-forms.
Add PFAaybabtu.pfa dependency on aybabtu.subfonts.
re.sub ('@', '@@', s)))
def split_options (option_string):
- return re.split (format_res[format]['option_sep'], option_string)
+ if option_string:
+ return re.split (format_res[format]['option_sep'],
+ option_string)
+ return []
class Chunk:
def replacement_text (self):
def __init__ (self, type, match, format, line_number):
Snippet.__init__ (self, type, match, format, line_number)
os = match.group ('options')
- self.do_options (os,self.type)
+ self.do_options (os, self.type)
def ly (self):
return self.substring ('code')
# it is too generic for lilypond-book.
if texstr_names and re.search ('^[0-9A-Za-z/]*lilypond', cmd):
- my_system (string.join ([cmd,'--backend texstr', 'snippet-map.ly'] + texstr_names))
+ my_system (string.join ([cmd, '--backend texstr',
+ 'snippet-map.ly'] + texstr_names))
for l in texstr_names:
my_system ('latex %s.texstr' % l)
if format == TEXINFO or format == HTML:
formats += ',png'
if process_cmd == '':
- process_cmd = lilypond_binary + ' --formats=%s --backend eps ' % formats
+ process_cmd = lilypond_binary \
+ + ' --formats=%s --backend eps ' % formats
if process_cmd:
process_cmd += string.join ([(' -I %s' % p)