diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-01-23 21:52:37 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-01-23 21:52:37 -0500 |
commit | dc5c01b1033cfc9e09fd4fc29666e826e67cd7bb (patch) | |
tree | e53a389c4f669d79b5b82ce6fd1853da6b25f85d /lib/sisu/v3dv/html.rb | |
parent | debian/changelog (3.1.11-1) (diff) | |
parent | v3dv: replace use of most ruby exclamation (!) method actions (diff) |
Merge commit 'sisu_3.1.12' into debian/sid
Diffstat (limited to 'lib/sisu/v3dv/html.rb')
-rw-r--r-- | lib/sisu/v3dv/html.rb | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/lib/sisu/v3dv/html.rb b/lib/sisu/v3dv/html.rb index 6306975f..2c249348 100644 --- a/lib/sisu/v3dv/html.rb +++ b/lib/sisu/v3dv/html.rb @@ -239,12 +239,12 @@ module SiSU_HTML toc=if dob_toc.is =='heading' \ or dob.is=='heading_insert' toc=case dob_toc.ln - when 1; Toc.new(@md,dob_toc).level_1 - when 2; Toc.new(@md,dob_toc).level_2 - when 3; Toc.new(@md,dob_toc).level_3 - when 4; Toc.new(@md,dob_toc).level_4 - when 5; Toc.new(@md,dob_toc).level_5 - when 6; Toc.new(@md,dob_toc).level_6 + when 1; SiSU_HTML::Source::Toc.new(@md,dob_toc).level_1 + when 2; SiSU_HTML::Source::Toc.new(@md,dob_toc).level_2 + when 3; SiSU_HTML::Source::Toc.new(@md,dob_toc).level_3 + when 4; SiSU_HTML::Source::Toc.new(@md,dob_toc).level_4 + when 5; SiSU_HTML::Source::Toc.new(@md,dob_toc).level_5 + when 6; SiSU_HTML::Source::Toc.new(@md,dob_toc).level_6 else nil end end @@ -488,8 +488,8 @@ WOK end def level_crosslink dob=@data - if dob !~/^4~!/ - dob.gsub!(/^4~!\s+(\S+)\s+(.+)/, + dob=if dob !~/^4~!/ + dob.gsub(/^4~!\s+(\S+)\s+(.+)/, %{<table><tr><td width =\"80\"></td> <td><a href="http://\\1" target="_top"> #{@png.crosslink_ext} @@ -498,7 +498,7 @@ WOK </td></tr></table> }) else - dob.gsub!(/^4~!\s+(\S+)\s+(.+)/, + dob.gsub(/^4~!\s+(\S+)\s+(.+)/, %{<table><tr><td width ="80"> </td><td> <a href="\\1" target="_top"> @@ -521,7 +521,7 @@ WOK SiSU_Screen::Ansi.new(@md.opt.cmd,'Scroll & Segtoc').txt_grey if @md.opt.cmd =~/[MVv]/ format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) dochead=format_head_toc.head - dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge + dochead=dochead.gsub(/toc\.(html)/,'doc.\1') #kludge ads=SiSU_HTML_Promo::Ad.new(@md) toc_shared << dochead << ads.div.major @segtoc << format_head_toc.head << ads.div.major @@ -584,8 +584,8 @@ WOK @segtoc << @seg_toc_band_bottom ads=SiSU_HTML_Promo::Ad.new(@md) @segtoc << format_head_toc.seg_navigation_tail << ads.div.close << ads.display << format_head_toc.html_close - @segtoc.flatten!.compact! - Output.new(@segtoc,@md).segtoc + @segtoc=@segtoc.flatten.compact #watch + SiSU_HTML::Source::Output.new(@segtoc,@md).segtoc @segtoc=[] @toc[:scr],@toc[:seg]=[],[] toc_shared @@ -603,7 +603,7 @@ WOK scroll=[] hr='<center><hr width=90% /></center>' scroll << @scr_toc << '<div class="scroll">' << hr << @scr_body << @scr_endnotes << hr << @scr_owner_details << '</div>' << @scr_tails - scroll.flatten!.compact! + scroll=scroll.flatten.compact #watch end end class Seg < SiSU_HTML_Seg::Seg @@ -617,12 +617,12 @@ WOK begin @filename_html_scroll=@file.write_file.html_scroll @data.each do |para| - para.strip! - para.gsub!(/<:.+?>/,'') - para.gsub!(Xx[:html_relative2],@file.path_rel_links.html_scroll_2) - para.gsub!(Xx[:html_relative1],@file.path_rel_links.html_scroll_1) - #para.gsub!(/#{Xx[:html_relative]}/,@file.path_rel_links.html_scroll) - para.gsub!(/#{Rx[:mx_fa_clean]}/,'') + para=para.strip. + gsub(/<:.+?>/,''). + gsub(Xx[:html_relative2],@file.path_rel_links.html_scroll_2). + gsub(Xx[:html_relative1],@file.path_rel_links.html_scroll_1). + #gsub(/#{Xx[:html_relative]}/,@file.path_rel_links.html_scroll). + gsub(/#{Rx[:mx_fa_clean]}/,'') unless para =~/\A\s*\Z/ @filename_html_scroll.puts para,"\n" end @@ -635,10 +635,10 @@ WOK begin @filename_html_segtoc=@file.write_file.html_segtoc @data.each do |para| - para.strip! - para.gsub!(/<!.+?!>/,'') - para.gsub!(Xx[:html_relative2],@file.path_rel_links.html_seg_2) - para.gsub!(Xx[:html_relative1],@file.path_rel_links.html_seg_1) + para=para.strip. + gsub(/<!.+?!>/,''). + gsub(Xx[:html_relative2],@file.path_rel_links.html_seg_2). + gsub(Xx[:html_relative1],@file.path_rel_links.html_seg_1) unless para =~/\A\s*\Z/ @filename_html_segtoc.puts para,"\n" end |