]> git.donarmstrong.com Git - lilypond.git/commitdiff
Lilypond-book: Robustify searches inside get_latex_textwidth ().
authorNeil Puttock <n.puttock@gmail.com>
Sat, 26 Sep 2009 19:33:40 +0000 (20:33 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Sat, 26 Sep 2009 19:33:40 +0000 (20:33 +0100)
* when searching for `columns', `columnsep' and `textwidth',
  try to match at least one digit following equals sign

scripts/lilypond-book.py

index 82238647060af470765d2cd8273d394e0a8fabf8..276c2aae509b42794145f9f05fd7d572fc600425 100644 (file)
@@ -1743,17 +1743,17 @@ def get_latex_textwidth (source):
     os.unlink (logfile)
 
     columns = 0
-    m = re.search ('columns=([0-9.]*)', parameter_string)
+    m = re.search ('columns=([0-9.]+)', parameter_string)
     if m:
         columns = int (m.group (1))
 
     columnsep = 0
-    m = re.search ('columnsep=([0-9.]*)pt', parameter_string)
+    m = re.search ('columnsep=([0-9.]+)pt', parameter_string)
     if m:
         columnsep = float (m.group (1))
 
     textwidth = 0
-    m = re.search ('textwidth=([0-9.]*)pt', parameter_string)
+    m = re.search ('textwidth=([0-9.]+)pt', parameter_string)
     if m:
         textwidth = float (m.group (1))
         if columns: