From 7d29da197a8fe957ea64ba51d47c839af621e387 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 4 Feb 2013 00:03:24 -0500 Subject: v4 (v3): html, includes book index fix, rest cosmetic --- lib/sisu/v4/html_scroll.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v4/html_scroll.rb') diff --git a/lib/sisu/v4/html_scroll.rb b/lib/sisu/v4/html_scroll.rb index f8d104bb..a8d84c9d 100644 --- a/lib/sisu/v4/html_scroll.rb +++ b/lib/sisu/v4/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') + dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/, + '\1') 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(/(\1(?:-\d+)?)<\/a>/,'\2') + x.gsub!(/(\1(?:-\d+)?)<\/a>/, + '\2') 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 -- cgit v1.2.3