diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-01-23 21:42:25 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-01-23 21:42:27 -0500 |
commit | 21f5e220b738add01c19c2b15a76f2d240b2c0d5 (patch) | |
tree | 287dac6e47cab1da0d0567e9dc79683bc8d757b0 /lib/sisu/v3dv/html_minitoc.rb | |
parent | v3dv: call most methods by full name (include associated module & class names) (diff) |
v3dv: replace use of most ruby exclamation (!) method actionssisu_3.1.12
Diffstat (limited to 'lib/sisu/v3dv/html_minitoc.rb')
-rw-r--r-- | lib/sisu/v3dv/html_minitoc.rb | 16 |
1 files changed, 8 insertions, 8 deletions
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!(/<a name="-\d+" href="#_\d+"> <sup>\d+<\/sup> <\/a>/,'') - txt.obj.gsub!(@pat_strip_heading_name,'\1') - txt.obj.gsub(/(.*?)<a name="(\d+)"><\/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(/<a name="-\d+" href="#_\d+"> <sup>\d+<\/sup> <\/a>/,''). + gsub(@pat_strip_heading_name,'\1') + #gsub(/(.*?)<a name="(\d+)"><\/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=%{ <a href="#{@@seg_url}#{@md.lang_code_insert}#{Sfx[:html]}##{txt.ocn}"> @@ -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=%{ <a href="#{@@seg_url}#{@md.lang_code_insert}#{Sfx[:html]}##{txt.ocn}"> |