From d98f27086318452017b80952a297f2ccb05bc4b1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 1 Oct 2012 16:09:17 -0400 Subject: v3: some fixes, cleaning, removing --- lib/sisu/v3/html_scroll.rb | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'lib/sisu/v3/html_scroll.rb') diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb index 8e9b6e11..170285cf 100644 --- a/lib/sisu/v3/html_scroll.rb +++ b/lib/sisu/v3/html_scroll.rb @@ -125,14 +125,22 @@ module SiSU_HTML_Scroll end elsif dob.is==:heading_insert x=if dob.ln==1 - sto.heading_body1 + unless dob.obj.empty? + sto.heading_body1 + end elsif dob.ln==2 - sto.heading_body2 + unless dob.obj.empty? + sto.heading_body2 + end elsif dob.ln==3 - sto.heading_body3 + unless dob.obj.empty? + sto.heading_body3 + end elsif dob.ln==4 \ and dob.obj !~/^(?:Endnotes|Index|Metadata|Manifest)$/ - sto.heading_body4 + unless dob.obj.empty? + sto.heading_body4 + end elsif dob.ln==4 \ and dob.obj=='Endnotes' sto.heading_body4 @@ -141,19 +149,18 @@ module SiSU_HTML_Scroll and dob.obj=='Index' 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 and strips segment identifying info + book_idx.each do |x| #takes book index prepared for segments & strips segment identifying info x=x.gsub(/(\1(?:-\d+)?)<\/a>/,'\2') end book_idx.join("\n") - #elsif dob.ln==4 \ - #and dob.obj=~/Meta/ - #p __LINE__ - ##and dob.obj=='Metadata' - #metadata=SiSU_Metadata::Summary.new(@md).xhtml.metadata elsif dob.ln==5 - sto.heading_body5 + unless dob.obj.empty? + sto.heading_body5 + end elsif dob.ln==6 - sto.heading_body6 + unless dob.obj.empty? + sto.heading_body6 + end end elsif dob.is==:para if dob.indent \ @@ -187,14 +194,13 @@ module SiSU_HTML_Scroll elsif dob.is==:table sto.table elsif dob.is==:break - sto.break end if dob =~// \ and dob =~/^(?:\^~\d+\s|)/ # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though dob='' end - unless @rcdc; @scr[:body] << para_html unless para_html =~/\A\s*\Z/ - else #@scr[:metadata] << dob.obj + unless @rcdc + @scr[:body] << para_html unless para_html =~/\A\s*\Z/ end end end -- cgit v1.2.3