From c0f656c0a644f49ce3b9ea9e53d95d3cbc4a4135 Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph@amissah.com>
Date: Mon, 28 Jan 2013 21:55:10 -0500
Subject: v4: param_make, :cover_image: regex, less finicky match of image &
 details
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* [bug reported by Mikael Böök]
---
 data/doc/sisu/CHANGELOG_v4 | 5 ++++-
 lib/sisu/v4/param_make.rb  | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index ef6dff80..1ddf47ec 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -24,6 +24,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.4.orig.tar.xz
   sisu_4.0.4.orig.tar.xz
   sisu_4.0.4-1.dsc
 
+* v4: param_make, :cover_image: regex, less finicky match of image & details
+  [bug reported by Mikael Böök]
+
 %% 4.0.3.orig.tar.xz (2013-01-27:03/7)
 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.3
 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.3-1
@@ -32,7 +35,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.3.orig.tar.xz
   sisu_4.0.3-1.dsc
 
 * v4: epub some fixing, more documents render in more readers/viewers
-  * ncx fix, navpoint_close
+  * ncx fix, navpoint_close [bug reported by Mikael Böök, with sample fix toc]
   * check xml representation of characters (& < > in particular)
 
 * v4: remove markup-sample of the first edition of FaiF as redundant, the
diff --git a/lib/sisu/v4/param_make.rb b/lib/sisu/v4/param_make.rb
index ce35307c..5d184897 100644
--- a/lib/sisu/v4/param_make.rb
+++ b/lib/sisu/v4/param_make.rb
@@ -460,7 +460,7 @@ module SiSU_Param_Make
           s=@h['cover_image'].split(/\s*;\s*/)
           s=s[0] #if
           image={}
-          if s =~/{(\S+\.(?:jpg|png|gif))(?:\s+(\d+x\d+))?\s+(?:"(.+?)")?\s*}image/
+          if s =~/{\s*(\S+\.(?:jpg|png|gif))(?:\s+(\d+x\d+))?(?:\s+"(.+?)")?\s*}image/
             image[:cover]=$1
             if $2
               image[:dimensions]=$2
-- 
cgit v1.2.3