diff options
Diffstat (limited to 'lib/sisu/v0/html_segments.rb')
-rw-r--r-- | lib/sisu/v0/html_segments.rb | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index 5b7ede63..c3617b24 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -197,7 +197,7 @@ module SiSU_HTML_seg data end def header_art(para) - format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) if para =~/^#{Mx[:lv_o]}[1-6]:/ #2004w27/5 if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next else @@seg[:dot_nav]=format_head_seg.dot_control_pre @@ -208,7 +208,7 @@ module SiSU_HTML_seg end def head(para) clean=/<!.*?!>|#{Mx[:gr_o]}:.*?#{Mx[:gr_c]}|<:.*?>|#{Mx[:id_o]}~\d+;(?:[ohum]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ - format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) if @@tracker < @@seg_total-1 if @@tracker == 0; @@segtocband=format_head_seg.toc_next2 #if format_head_seg.toc_next2 else @@segtocband=format_head_seg.toc_pre_next2 #if format_head_seg.toc_pre_next2 @@ -220,13 +220,13 @@ module SiSU_HTML_seg @dc_creator=%{<b>#{@md.dc_creator}</b>\n} if @md.dc_creator.to_s =~/\S/ @@seg[:tocband_banner] << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav]) @@seg[:tocband_bannerless] << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) - @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format_type::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug + @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator).gsub(clean,'') paranum=if @@header1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1 else '' end - @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,@@header1,@p_num.ocn_display) + @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,@@header1,@p_num.ocn_display) @@seg[:headers] << format_seg.title_header1.gsub(clean,'') @@header1.gsub!(/ <a name="-[\d*+]+" href="#_[\d*+]+"> <sup>[\d*+]+<\/sup> <\/a>/,'') end @@ -235,8 +235,8 @@ module SiSU_HTML_seg paranum=if header2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1 else '' end - @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,header2,@p_num.ocn_display) + @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,header2,@p_num.ocn_display) @@seg[:headers] << format_seg.title_header2.gsub(clean,'') @@header2.gsub!(/ <a name="-[\d*+]+" href="#_[\d*+]+"> <sup>[\d*+]+<\/sup> <\/a>/,'') end @@ -245,8 +245,8 @@ module SiSU_HTML_seg paranum=if header3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1 else '' end - @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,header3,@p_num.ocn_display) + @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,header3,@p_num.ocn_display) @@seg[:headers] << format_seg.title_header3.gsub(clean,'') @@header3.gsub!(/ <a name="-[\d*+]+" href="#_[\d*+]+"> <sup>[\d*+]+<\/sup> <\/a>/,'') end @@ -255,8 +255,8 @@ module SiSU_HTML_seg paranum=if header4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1 else '' end - @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,header4,@p_num.ocn_display) + @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,header4,@p_num.ocn_display) @@seg[:headers] << format_seg.title_header4.gsub(clean,'') end @@seg[:header_endnotes]=format_head_seg.title_endnote(@md.title,@md.subtitle,@dc_creator,@@seg[:dot_nav]) @@ -264,12 +264,12 @@ module SiSU_HTML_seg end def markup(para) @debug=[] - format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) if para !~/^#{Rx[:meta]}/ m=para[/.+?#{Mx[:id_o]}~(\d+);(?:[ohm]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/] if m paranum=m[1].to_s - @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) + @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) end if para =~/#{Mx[:gr_o]}(?:code|alt|verse|group)#{Mx[:gr_c]}/m \ or @@flag_alt==true @@ -293,13 +293,13 @@ module SiSU_HTML_seg if para !~/^#{Mx[:lv_o]}[1-9]:|#{Rx[:meta]}/ if para =~/(.*)#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/ one,two=$1,$2 - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) para=format_seg.no_paranum end end if para[/#{Mx[:id_o]}~(\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp)#{Mx[:id_c]}$/] @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_seg - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch + format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch para=case @sto.format # work area 2003w29 ||@|def lev_segname_para_ocn| when /^4:/; @sto.seg_lev_para_ocn.header4 # work on see Split_text_object when /^5:/; @sto.seg_lev_para_ocn.header5 @@ -341,13 +341,13 @@ module SiSU_HTML_seg if para !~/#{@vz.margin_txt_w1}|#{@vz.margin_txt_w2}/ if para[/(.*)#{Mx[:id_o]}~0;(?:u|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/] #% watch u & m? one,two=$1,$2 - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) #FIX --> not that undefined, rather is not needed, should not be visited, and remove #para=format_seg.seg_no_paranum #% undefined end para.gsub!(/\s*(-\{{2}~\d+|<:e[:_]\d+>).*/,'') #potentially dagerous - removes all paragraphs with <!e_!> #?? workpoint if para =~/<a name="_\d+" href="#-\d+"> <sup>/ #endnote- note- - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,para) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,para) para=format_seg.no_paranum end end @@ -363,7 +363,7 @@ module SiSU_HTML_seg end end def tail - format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) if @md.flag_auto_endnotes @@seg[:tail] << format_head_seg.endnote_mark @@seg[:tail] << @@seg_endnotes[@@get_hash_fn] #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES| @@ -437,11 +437,11 @@ module SiSU_HTML_seg case para # series changed 2002w42 when /^#{Mx[:lv_o]}5:\S*?#{Mx[:lv_c]}\s*(.+)?#{Mx[:id_o]}~(\d+);(?:h|[56]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ #remove [u]? req by pg texts, revist one,two=$1,$2 - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) para=format_seg.subtoc_lev5 when /^#{Mx[:lv_o]}6:\S*?#{Mx[:lv_c]}\s*(.+)?#{Mx[:id_o]}~(\d+);(?:h|[56]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ one,two=$1,$2 - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) para=format_seg.subtoc_lev6 end @@seg_subtoc_array << para @@ -466,7 +466,7 @@ module SiSU_HTML_seg e_n=note_match_seg[/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,1] try=e_n.split(/<br \/>/) try.each do |e| - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,e) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,e) note_match=if e =~/#{Mx[:pa_o]}i[1-9]#{Mx[:pa_c]}/ format_seg.endnote_body_seg_tail_indent else format_seg.endnote_body_seg_tail @@ -478,7 +478,7 @@ module SiSU_HTML_seg m=/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?href=")(#-[\d*+]+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi one=note_match_seg[m,1] #note~ [a name] two=note_match_seg[m,2] #note- - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) + format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408 @@seg[:endnote_all] << note_match_all_seg end |