diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-10-01 16:09:17 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-10-01 16:09:17 -0400 |
commit | d98f27086318452017b80952a297f2ccb05bc4b1 (patch) | |
tree | df39d4ff3f86ff4648efc66683b87c67e8e1fb1a /lib/sisu/v3/html_scroll.rb | |
parent | v3: cosmetic code, remove javascript holders js_ (not used) (diff) |
v3: some fixes, cleaning, removing
Diffstat (limited to 'lib/sisu/v3/html_scroll.rb')
-rw-r--r-- | lib/sisu/v3/html_scroll.rb | 36 |
1 files changed, 21 insertions, 15 deletions
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(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,'<a href="#\1">\2</a>') 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 =~/<a name="n\d+">/ \ and dob =~/^(?:\^~\d+\s|<!e[:_]\d+!>)/ # 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 |