diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-08-23 12:01:59 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-08-23 12:01:59 -0400 |
commit | 08c69d074001507d64cd5960c8679ec91a5a8353 (patch) | |
tree | af52d5986b3108abc5edbd943ea287455c89deb3 /lib/sisu/v0/xhtml.rb | |
parent | a bit of a cleanup, and change reference to null to ordinary (diff) |
pass Hash to Format classes; some match tuning in dal
Diffstat (limited to 'lib/sisu/v0/xhtml.rb')
-rw-r--r-- | lib/sisu/v0/xhtml.rb | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/lib/sisu/v0/xhtml.rb b/lib/sisu/v0/xhtml.rb index 593d26c4..95da5d2d 100644 --- a/lib/sisu/v0/xhtml.rb +++ b/lib/sisu/v0/xhtml.rb @@ -289,7 +289,8 @@ WOK unless @rcdc m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ + txt_obj={:txt =>@sto.text} + format_scroll=SiSU_XML_format::Format_scroll.new(@md,txt_obj) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_structure(para,$1,@sto.ocn,$2) @@ -342,26 +343,29 @@ WOK and para !~/#{Mx[:id_o]}~\d+;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ elsif para =~/(MetaData)/ \ and para =~/#{Mx[:id_o]}~\d+;[m]\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ #debug 2003w46 add rc info - format_scroll=Format_scroll.new(@md,'<br /><a name="metadata">MetaData</a>') + txt_obj={:txt =>'<br /><a name="metadata">MetaData</a>'} + format_scroll=Format_scroll.new(@md,txt_obj) para=format_scroll.bold_para elsif para =~/(Owner Details)/ \ and para !~/#{Mx[:id_o]}~\d+;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ - format_scroll=Format_scroll.new(@md,'<br /><a name="owner.details">Owner Details</a>') + txt_obj={:txt =>'<br /><a name="owner.details">Owner Details</a>'} + format_scroll=Format_scroll.new(@md,txt_obj) @@xml[:owner_details]=format_scroll.bold_para para='' - elsif para =~/(.*)<:#>(.*)/ - one,two=$1,$2 - format_text=Format_text_object.new(one,two) - para=format_text.seg_no_paranum - end - if para =~/<a name="n\d+">/ \ - and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote - para='' + #elsif para =~/(.*)<:#>(.*)/ + # one,two=$1,$2 + # format_text=Format_text_object.new(one,two) + # para=format_text.seg_no_paranum end + #if para =~/<a name="n\d+">/ \ + #and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote + # para='' + #end para=case para when /#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]}/ if para =~/.*<:#>.*$/ - format_text=Format_text_object.new(para,'') + txt_obj={:txt =>para} + format_text=Format_text_object.new(@md,txt_obj) format_text.scr_inden_ocn_e_no_paranum end else para @@ -369,11 +373,6 @@ WOK if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ # i don't get the condition for no paranum end - if para =~/<:center>/ - one,two=/(.*)<:center>(.*)/.match(para)[1,2] - format_text=Format_text_object.new(one,two) - para=format_text.center - end else # end para.gsub!(/#{Mx[:pa_o]}:\S+#{Mx[:pa_c]}/,'') if para |