aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/html_scroll.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/html_scroll.rb')
-rw-r--r--lib/sisu/v3/html_scroll.rb36
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