diff options
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 } |