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_minitoc.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_minitoc.rb')
-rw-r--r-- | lib/sisu/v3dv/html_minitoc.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/sisu/v3dv/html_minitoc.rb b/lib/sisu/v3dv/html_minitoc.rb index 7f891a2e..d70fa7e1 100644 --- a/lib/sisu/v3dv/html_minitoc.rb +++ b/lib/sisu/v3dv/html_minitoc.rb @@ -75,17 +75,17 @@ @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; TocMini.new(@md,txt).level_1 - when 2; TocMini.new(@md,txt).level_2 - when 3; TocMini.new(@md,txt).level_3 - when 4; TocMini.new(@md,txt).level_4 - when 5; TocMini.new(@md,txt).level_5 - when 6; TocMini.new(@md,txt).level_6 + when 1; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_1 + when 2; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_2 + when 3; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_3 + when 4; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_4 + when 5; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_5 + when 6; SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_6 else end @toc << toc @@ -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}"> |