diff options
Diffstat (limited to 'lib/sisu/v0/html_scroll.rb')
| -rw-r--r-- | lib/sisu/v0/html_scroll.rb | 30 | 
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index 01720862..9286df10 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -102,13 +102,16 @@ module SiSU_HTML_scroll            unless para =~/^#{Mx[:gr_o]}code#{Mx[:gr_c]}/; para.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ')            end            if para =~/.+?#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ -            paranum=para[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/,1] -            @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,paranum) +            ocn=para[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/,1] +            @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn)            end            @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_scroll            m=/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/            if para =~m -            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ #watch +            if @sto.format =~/i[1-9]|ordinary/ #watch +              txt_obj={:txt =>@sto.text} +              format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) +            end              case @sto.format              when /^1:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body1              when /^2:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body2 @@ -139,30 +142,33 @@ module SiSU_HTML_scroll              end            elsif para =~/^#{Mx[:lv_o]}[1-9]:/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_c]}#@dp:#@dp#{Mx[:id_c]}$/ -            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,para) +            txt_obj={:txt =>para} +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj)              para=format_txt_obj.bold_header            elsif para =~/Endnotes?/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ -            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,'<br /><a name="notes">Note</a>') +            txt_obj={:txt =>'<br /><a name="notes">Note</a>'} +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj)              para=format_txt_obj.bold_para            elsif para =~/Owner Details/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ -            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>') +            txt_obj={:txt =>'<br /><a name="owner.details">Owner Details</a>'} +            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj)              @scr[:owner_details]=format_txt_obj.bold_para              para=''            elsif para =~/(.*)#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/ #watch -            one,two=$1,$2 -            format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) +            cont=if $2.empty? +              $1 +            else "#{$1} #{$2}" #watch, check desired where $2 is other than space +            end +            txt_obj={:txt =>cont} +            format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)              para=format_seg.no_paranum            end            if para =~/<a name="n\d+">/ \            and para =~/^(?:\^~\d+\s|<!e[:_]\d+!>)/ # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though              para=''            end -          if para =~/<:center>/ #rules changed now a <p class="center" problems may arise 2005w11 ! -            one,two=/(.*)<:center>(.*)/.match(para).captures -            format_scroll=SiSU_HTML_Format::Format_scroll.new(@md,one,two) -          end            para.gsub!(/^#{Rx[:mx_fa_clean]}/,' '); para.gsub!(/^<:\S?>/,'')            para.gsub!(/#{Rx[:mx_fa_clean]}/,' '); para.gsub!(/<:\S?>/,' '); para.gsub!(/<!.+!>/,' ')            para.strip!  | 
