From: Neil Puttock <n.puttock@gmail.com>
Date: Sat, 26 Sep 2009 19:33:40 +0000 (+0100)
Subject: Lilypond-book: Robustify searches inside get_latex_textwidth ().
X-Git-Tag: release/2.13.5-0~31
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4492a1f57c671c0233cd2421bd63b54557d6e5e4;p=lilypond.git

Lilypond-book: Robustify searches inside get_latex_textwidth ().

* when searching for `columns', `columnsep' and `textwidth',
  try to match at least one digit following equals sign
---

diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py
index 8223864706..276c2aae50 100644
--- a/scripts/lilypond-book.py
+++ b/scripts/lilypond-book.py
@@ -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: