aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/epub_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-06-25 00:07:44 -0400
committerRalph Amissah <ralph@amissah.com>2013-06-25 00:07:44 -0400
commitc25fc2751886278a4e7f30f127e80449160a47f1 (patch)
treed19cab06d629a995848a296409693b5890d59f60 /lib/sisu/v4/epub_format.rb
parentv5: "general code cleaning" fix (diff)
v4: general code cleaning, sync with v5sisu_4.1.6
Diffstat (limited to 'lib/sisu/v4/epub_format.rb')
-rw-r--r--lib/sisu/v4/epub_format.rb58
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb
index 683228c3..a4978e6d 100644
--- a/lib/sisu/v4/epub_format.rb
+++ b/lib/sisu/v4/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
</manifest>
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 +%{<a name="#{t}" />}
+ tags=tags << %{<a name="#{t}" />}
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