aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/html_scroll.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-02-04 00:11:52 -0500
committerRalph Amissah <ralph@amissah.com>2013-02-04 00:11:52 -0500
commitb509e362a21e86e95cc46ff582db1f8e2bc14319 (patch)
tree7911fb8f6a2b4784f70ad7dd90f2744e0dbeed31 /lib/sisu/v3/html_scroll.rb
parentdebian/changelog (4.0.4-1) (diff)
parentv4: documentation, include --html-scroll and --html-seg options (diff)
Merge tag 'sisu_4.0.5' into debian/sid
Diffstat (limited to 'lib/sisu/v3/html_scroll.rb')
-rw-r--r--lib/sisu/v3/html_scroll.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb
index 15bea9eb..07fa5d98 100644
--- a/lib/sisu/v3/html_scroll.rb
+++ b/lib/sisu/v3/html_scroll.rb
@@ -86,7 +86,8 @@ module SiSU_HTML_Scroll
dob.obj=dob.obj.gsub(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image)
if defined? dob.name and dob.name =~/^meta/ \
and dob.obj =~/Document Information/
- dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,'\1<a name="docinfo"></a>')
+ dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,
+ '\1<a name="docinfo"></a>')
end
if dob.obj =~/^Metadata$/ \
and dob.lv =='B'
@@ -152,7 +153,8 @@ module SiSU_HTML_Scroll
sto.heading_body4
book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx
book_idx.each do |x| #takes book index prepared for segments & strips segment identifying info
- x=x.gsub(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,'<a href="#\1">\2</a>')
+ x.gsub!(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,
+ '<a href="#\1">\2</a>')
end
book_idx.join("\n")
elsif dob.ln==5
@@ -170,11 +172,9 @@ module SiSU_HTML_Scroll
and dob.indent =~/[0-9]/ \
and dob.hang =~/[0-9]/
if dob.bullet_
- if dob.indent =~/[1-9]/
- sto.format('li',"i#{dob.indent}")
- else
- sto.format('li','bullet')
- end
+ (dob.indent =~/[1-9]/) \
+ ? sto.format('li',"i#{dob.indent}")
+ : sto.format('li','bullet')
elsif dob.indent == dob.hang
sto.format('p',"i#{dob.indent}")
elsif dob.indent != dob.hang