From f31e286f4a73c5c0f355512b0cb45c6c82088516 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 22 Jun 2013 01:13:46 -0400 Subject: v5: general code cleaning * propagate back to v4 after testing --- lib/sisu/v5/epub_format.rb | 58 +++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'lib/sisu/v5/epub_format.rb') diff --git a/lib/sisu/v5/epub_format.rb b/lib/sisu/v5/epub_format.rb index 75967653..2ac7a91a 100644 --- a/lib/sisu/v5/epub_format.rb +++ b/lib/sisu/v5/epub_format.rb @@ -1471,12 +1471,12 @@ output_epub_cont_seg.close author=if defined? @md.creator.author \ and @md.creator.author =~/\S+/ m='' - @md.creator.author_detail.each do |x| - surname=x[:the] \ - ? x[:the] + @md.creator.author_detail.each do |i| + surname=i[:the] \ + ? i[:the] : '' - other_names=x[:others] \ - ? ', ' + x[:others] + other_names=i[:others] \ + ? ', ' + i[:others] : '' m=(m.empty?) \ ? (surname + other_names) @@ -1491,12 +1491,12 @@ output_epub_cont_seg.close editor=if defined? @md.creator.editor \ and @md.creator.editor =~/\S+/ m='' - @md.creator.editor_detail.each do |x| - surname=x[:the] \ - ? x[:the] + @md.creator.editor_detail.each do |i| + surname=i[:the] \ + ? i[:the] : '' - other_names=x[:others] \ - ? ', ' + x[:others] + other_names=i[:others] \ + ? ', ' + i[:others] : '' m=(m.empty?) \ ? (surname + other_names) @@ -1511,12 +1511,12 @@ output_epub_cont_seg.close translator=if defined? @md.creator.translator \ and @md.creator.translator =~/\S+/ m='' - @md.creator.translator_detail.each do |x| - surname=x[:the] \ - ? x[:the] + @md.creator.translator_detail.each do |i| + surname=i[:the] \ + ? i[:the] : '' - other_names=x[:others] \ - ? ', ' + x[:others] + other_names=i[:others] \ + ? ', ' + i[:others] : '' m=(m.empty?) \ ? (surname + other_names) @@ -1531,12 +1531,12 @@ output_epub_cont_seg.close illustrator=if defined? @md.creator.illustrator \ and @md.creator.illustrator =~/\S+/ m='' - @md.creator.illustrator_detail.each do |x| - surname=x[:the] \ - ? x[:the] + @md.creator.illustrator_detail.each do |i| + surname=i[:the] \ + ? i[:the] : '' - other_names=x[:others] \ - ? ', ' + x[:others] + other_names=i[:others] \ + ? ', ' + i[:others] : '' m=(m.empty?) \ ? (surname + other_names) @@ -1607,7 +1607,7 @@ output_epub_cont_seg.close WOK end def manifest_cover_image_information(md) - cover_image=if defined? md.make.cover_image \ + if defined? md.make.cover_image \ and @md.make.cover_image.is_a?(Hash) \ and md.make.cover_image[:cover] =~/\S+/ <<-WOK @@ -1635,9 +1635,9 @@ output_epub_cont_seg.close end images=images.join('') images - end - def manifest_close - <<-WOK + end + def manifest_close + <<-WOK WOK end @@ -1879,7 +1879,7 @@ output_epub_cont_seg.close @headname=((t_o.is==:heading and defined? t_o.name) ? t_o.name : nil) else if @md.opt.cmd =~/M/ - p __FILE__ +':'+ __LINE__.to_s + p __FILE__ << ':' << __LINE__.to_s p t_o.class p caller end @@ -1895,7 +1895,7 @@ output_epub_cont_seg.close if defined? dob.tags \ and dob.tags.length > 0 # insert tags "hypertargets" dob.tags.each do |t| - tags=tags +%{} + tags=tags << %{} end end tags @@ -1989,17 +1989,17 @@ output_epub_cont_seg.close } end def title_heading1 - id_u=DISABLE[:epub][:per_section_title] \ + DISABLE[:epub][:per_section_title] \ ? '' : title_heading('h1','tiny') end def title_heading2 - id_u=DISABLE[:epub][:per_section_title] \ + DISABLE[:epub][:per_section_title] \ ? '' : title_heading('h2','tiny') end def title_heading3 - id_u=DISABLE[:epub][:per_section_title] \ + DISABLE[:epub][:per_section_title] \ ? '' : title_heading('h3','tiny') end -- cgit v1.2.3