diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-05-23 22:46:26 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-05-23 22:46:26 -0400 |
commit | a14b86c35fcd6cb81057b43cfdc0dcdf5aa20eef (patch) | |
tree | 6356a6f59a89a9ed81cc68e7356c83c9ec42630a /lib/sisu/v3/html_minitoc.rb | |
parent | debian/changelog (3.0.9-1) (diff) | |
parent | v3: defaults, fix path to homepage image (more fixes remain...) (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v3/html_minitoc.rb')
-rw-r--r-- | lib/sisu/v3/html_minitoc.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sisu/v3/html_minitoc.rb b/lib/sisu/v3/html_minitoc.rb index 7390ee7c..3a4f8fc5 100644 --- a/lib/sisu/v3/html_minitoc.rb +++ b/lib/sisu/v3/html_minitoc.rb @@ -115,7 +115,7 @@ title=unless txt.obj =~/Document Information/; txt.obj else link='metadata' - %{<b><a href="#{@md.fnl[:pre]}#{link}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}">#{txt.obj}</a></b>} + %{<b><a href="#{link}#{@md.lang_code_insert}#{Sfx[:html]}">#{txt.obj}</a></b>} end toc={} txt_obj={ txt: title } @@ -148,13 +148,13 @@ txt=@data unless txt =~/~metadata/ if txt.ln ==4 - seg_link=%{ <a href="#{@md.fnl[:pre]}#{txt.name}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" target="_top"> + seg_link=%{ <a href="#{txt.name}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top"> #{txt.obj} </a> } @@seg_url=txt.name elsif txt.obj =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/ seg_link=txt.obj.gsub(/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/, - %{<a href="#{@md.fnl[:pre]}\\2#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" } + + %{<a href="\\2#{@md.lang_code_insert}#{Sfx[:html]}" } + %{target="_top">\\1 \\2</a> }) end txt_obj={ txt: seg_link } @@ -170,7 +170,7 @@ txt.obj.gsub!(@pat_strip_heading_name,'\1') end toc={} - lnk_n_txt=%{ <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}##{txt.ocn}"> + lnk_n_txt=%{ <a href="#{@@seg_url}#{@md.lang_code_insert}#{Sfx[:html]}##{txt.ocn}"> #{txt.obj} </a>} txt_obj={ txt: lnk_n_txt } @@ -185,7 +185,7 @@ txt.obj.gsub!(@pat_strip_heading_name,'\1') end toc={} - lnk_n_txt=%{ <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}##{txt.ocn}"> + lnk_n_txt=%{ <a href="#{@@seg_url}#{@md.lang_code_insert}#{Sfx[:html]}##{txt.ocn}"> #{txt.obj} </a>} txt_obj={ txt: lnk_n_txt } |