aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-03-10 16:43:15 -0500
committerRalph Amissah <ralph@amissah.com>2010-03-10 16:43:15 -0500
commitc36e976c00bac90fd01fe12f6c9bc632e3b209b7 (patch)
tree832854a045863095e1e8edc3513eed624c547f6c /lib/sisu/v2/html.rb
parentsha256 for 2.0.0 in other changelog (diff)
epub, html: make robust where missing param values
Diffstat (limited to 'lib/sisu/v2/html.rb')
-rw-r--r--lib/sisu/v2/html.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb
index 4959d683..834eefa1 100644
--- a/lib/sisu/v2/html.rb
+++ b/lib/sisu/v2/html.rb
@@ -533,7 +533,7 @@ WOK
format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj)
toc_shared << format_txt_obj.center_bold
@segtoc << format_txt_obj.center_bold
- if @md.creator.author
+ if defined? @md.creator.author
creator_endnote=@md.creator.author.gsub(/(\*+)/,%{&nbsp;<sup><a href="#notes">\\1</a></sup>})
tmp_head=creator_endnote + "\n"
txt_obj={:txt =>tmp_head}
@@ -553,13 +553,20 @@ WOK
end
tmp_head=nil
toc_shared << @links_guide_toc
- toc_shared << rights if @md.rights.all
- toc_shared << prefix_b if @md.prefix_b
+ if defined? @md.rights.all #and ? @md.rights.all
+ toc_shared << rights
+ end
+ if defined? @md.prefix_b
+ toc_shared << prefix_b
+ end
#Table of Contents added/appended here
toc_shared << @toc[:scr]
@segtoc << @links_guide_toc
@segtoc << @toc[:seg]
- @segtoc << rights if @md.rights.all
+ if defined? @md.rights.all \
+ and not @md.rights.all.empty?
+ @segtoc << rights
+ end
@segtoc << prefix_b if @md.prefix_b
#Segtoc tail added here
@segtoc << "</p>\n" #bugfix sort later DEBUGNOW