From 577f1efec130fd159116cf156fbaf76ede3aecc8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 28 Dec 2012 12:41:38 -0500 Subject: v4 v3: html_segments (by_filename by_filetype) broken internal doc links fixed * filenames need to include lang code * [chals on irc, re live-manual, debian-live] --- lib/sisu/v3/html_segments.rb | 6 +++++- lib/sisu/v4/html_segments.rb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb index 81bb08d4..a5364467 100644 --- a/lib/sisu/v3/html_segments.rb +++ b/lib/sisu/v3/html_segments.rb @@ -211,7 +211,11 @@ module SiSU_HTML_Seg m=$1 if map_nametags[m] \ and map_nametags[m][:segname] - dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#{map_nametags[m][:segname]}#{Sfx[:html]}#\\1"}) + inf=SiSU_Env::FileOp.new(@md) if @md + lng=(inf.output_dir_structure.by_language_code?) \ + ? '' + : '.' + @md.opt.lng + dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#{map_nametags[m][:segname]}#{lng}#{Sfx[:html]}#\\1"}) else p "NOT FOUND name_tags: #{m}" dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#\\1"}) # not satisfactory diff --git a/lib/sisu/v4/html_segments.rb b/lib/sisu/v4/html_segments.rb index 97334023..d83e7d5f 100644 --- a/lib/sisu/v4/html_segments.rb +++ b/lib/sisu/v4/html_segments.rb @@ -211,7 +211,11 @@ module SiSU_HTML_Seg m=$1 if map_nametags[m] \ and map_nametags[m][:segname] - dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#{map_nametags[m][:segname]}#{Sfx[:html]}#\\1"}) + inf=SiSU_Env::FileOp.new(@md) if @md + lng=(inf.output_dir_structure.by_language_code?) \ + ? '' + : '.' + @md.opt.lng + dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#{map_nametags[m][:segname]}#{lng}#{Sfx[:html]}#\\1"}) else p "NOT FOUND name_tags: #{m}" dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#\\1"}) # not satisfactory -- cgit v1.2.3