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_minitoc.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v3dv/html_minitoc.rb') diff --git a/lib/sisu/v3dv/html_minitoc.rb b/lib/sisu/v3dv/html_minitoc.rb index 96ef5d75..d70fa7e1 100644 --- a/lib/sisu/v3dv/html_minitoc.rb +++ b/lib/sisu/v3dv/html_minitoc.rb @@ -75,10 +75,10 @@ @toc=[] @data.each do |txt| if (txt.is =='heading' or txt.is =='heading_insert') - txt.obj.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,'') #remove endnotes from toc - txt.obj.gsub!(/ \d+<\/sup> <\/a>/,'') - txt.obj.gsub!(@pat_strip_heading_name,'\1') - txt.obj.gsub(/(.*?)<\/a>(.*)/,'\1') #2002w42 altered gsub! - problematic? - suspect + txt.obj=txt.obj.gsub(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,''). #remove endnotes from toc + gsub(/ \d+<\/sup> <\/a>/,''). + gsub(@pat_strip_heading_name,'\1') + #gsub(/(.*?)<\/a>(.*)/,'\1') #2002w42 altered gsub - problematic? - suspect toc=case txt.ln when 1; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_1 when 2; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_2 @@ -110,7 +110,7 @@ txt=@data if (txt.is =='heading' or txt.is =='heading_insert') \ and txt.ocn !=0 - txt.obj.gsub!(@pat_strip_heading_name,'\1') + txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1') end title=unless txt.obj =~/Document Information/; txt.obj else @@ -130,7 +130,7 @@ txt=@data if (txt.is =='heading' or txt.is =='heading_insert') \ and txt.ocn !=0 - txt.obj.gsub!(@pat_strip_heading_name,'\1') + txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1') end txt_obj={ txt: txt.obj } format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) @@ -167,7 +167,7 @@ txt=@data if (txt.is =='heading' or txt.is =='heading_insert') \ and txt.ocn !=0 - txt.obj.gsub!(@pat_strip_heading_name,'\1') + txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1') end toc={} lnk_n_txt=%{ @@ -182,7 +182,7 @@ txt=@data if (txt.is =='heading' or txt.is =='heading_insert') \ and txt.ocn !=0 - txt.obj.gsub!(@pat_strip_heading_name,'\1') + txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1') end toc={} lnk_n_txt=%{ -- cgit v1.2.3