From 21f5e220b738add01c19c2b15a76f2d240b2c0d5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 23 Jan 2012 21:42:25 -0500 Subject: v3dv: replace use of most ruby exclamation (!) method actions --- lib/sisu/v3dv/html.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/sisu/v3dv/html.rb') diff --git a/lib/sisu/v3dv/html.rb b/lib/sisu/v3dv/html.rb index 3006ff95..2c249348 100644 --- a/lib/sisu/v3dv/html.rb +++ b/lib/sisu/v3dv/html.rb @@ -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+(.+)/, %{
#{@png.crosslink_ext} @@ -498,7 +498,7 @@ WOK
}) else - dob.gsub!(/^4~!\s+(\S+)\s+(.+)/, + dob.gsub(/^4~!\s+(\S+)\s+(.+)/, %{
@@ -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,7 +584,7 @@ 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! + @segtoc=@segtoc.flatten.compact #watch SiSU_HTML::Source::Output.new(@segtoc,@md).segtoc @segtoc=[] @toc[:scr],@toc[:seg]=[],[] @@ -603,7 +603,7 @@ WOK scroll=[] hr='

' scroll << @scr_toc << '
' << hr << @scr_body << @scr_endnotes << hr << @scr_owner_details << '
' << @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 -- cgit v1.2.3