From 6bc3b814011e829db684ec96bb3abd1e4abb29c3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Aug 2014 00:34:25 -0400 Subject: v5 v6: extend document structure, headings A - D, 1 - 4 * sql db table structure changed (needs to be rebuilt) --- lib/sisu/v5/html_scroll.rb | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v5/html_scroll.rb') diff --git a/lib/sisu/v5/html_scroll.rb b/lib/sisu/v5/html_scroll.rb index 4dbc2800..c11a532a 100644 --- a/lib/sisu/v5/html_scroll.rb +++ b/lib/sisu/v5/html_scroll.rb @@ -88,11 +88,13 @@ module SiSU_HTML_Scroll @rcdc=false @scr={ body: [], metadata: [], owner_details: [] } data.each do |dob| - dob.obj=dob.obj.gsub(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image) + 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' @@ -108,7 +110,8 @@ module SiSU_HTML_Scroll gsub(/href="#{Xx[:segment]}/m,'href="') if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]})/ unless dob.is ==:code - dob.obj=dob.obj.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') + dob.obj=dob.obj. + gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') end if defined? dob.ocn @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,dob.ocn) @@ -129,6 +132,8 @@ module SiSU_HTML_Scroll sto.heading_body5 elsif dob.ln==6 sto.heading_body6 + elsif dob.ln==7 + sto.heading_body7 end elsif dob.is==:break \ and dob.from==:markup @@ -162,7 +167,8 @@ module SiSU_HTML_Scroll elsif dob.ln==4 \ and dob.obj=='Index' sto.heading_body4 - book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx + book_idx=SiSU_Particulars::CombinedSingleton. + instance.get_idx_html(@md.opt).html_idx book_idx.each do |y| #takes book index prepared for segments & strips segment identifying info y.gsub!(/(\1(?:-\d+)?)<\/a>/, '\2') @@ -176,6 +182,10 @@ module SiSU_HTML_Scroll unless dob.obj.empty? sto.heading_body6 end + elsif dob.ln==7 + unless dob.obj.empty? + sto.heading_body7 + end end elsif dob.is==:para if dob.indent \ @@ -222,7 +232,9 @@ module SiSU_HTML_Scroll def tails scr_tail=[] format_head_scroll=SiSU_HTML_Format::HeadToc.new(@md) - scr_tail << format_head_scroll.scroll_tail << format_head_scroll.html_close + scr_tail \ + << format_head_scroll.scroll_tail \ + << format_head_scroll.html_close scr_tail end end -- cgit v1.2.3