aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/html_minitoc.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-05-23 21:23:30 -0400
committerRalph Amissah <ralph@amissah.com>2011-05-23 21:27:08 -0400
commita11485b8aa86780677c7a5ac415551e559e5961c (patch)
tree6d9bf5d421518c2faa790b3fa30c950731273ced /lib/sisu/v3/html_minitoc.rb
parentv3: prog_text_translation, language class name fix; languge name matching (diff)
v3: param, html, epub, xml, simplify file-naming with language code
* language code occurs in fixed location within file-name (could previously do so in 1 of 3 configured locations)
Diffstat (limited to 'lib/sisu/v3/html_minitoc.rb')
-rw-r--r--lib/sisu/v3/html_minitoc.rb10
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 }