From c36e976c00bac90fd01fe12f6c9bc632e3b209b7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 10 Mar 2010 16:43:15 -0500 Subject: epub, html: make robust where missing param values --- lib/sisu/v2/epub_format.rb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v2/epub_format.rb') diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb index 5599a435..498912a3 100644 --- a/lib/sisu/v2/epub_format.rb +++ b/lib/sisu/v2/epub_format.rb @@ -1024,17 +1024,28 @@ WOK WOK end def metadata #metadata dc - illustrator=if defined? @md.creator.illustrator and @md.creator.illustrator =~/\S+/ + author=if defined? @md.creator.author \ + and @md.creator.author =~/\S+/ + %{\n #{@md.creator.author}} + else '' + end + illustrator=if defined? @md.creator.illustrator \ + and @md.creator.illustrator =~/\S+/ %{\n #{@md.creator.illustrator}} else '' end + rights=if defined? @md.rights.all \ + and @md.rights.all =~/\S+/ + %{\n #{@md.rights.all}} + else '' + end < #{@md.title.full} - #{@md.creator.author}#{illustrator} + #{author}#{illustrator} en-US ... - #{@md.rights.all} + #{rights} urn:uuid:#{@md.dgst[1]} WOK -- cgit v1.2.3