aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html_segments.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-05-26 13:18:31 -0400
committerRalph Amissah <ralph@amissah.com>2010-05-26 13:18:31 -0400
commitfec639c59a032977b87ff49920e74ae08d485f04 (patch)
tree938c32c8a74fe39177afb5255ac229c599e0186b /lib/sisu/v2/html_segments.rb
parentsysenv, require constants, (issue with webrick) (diff)
output formats internal document (and relative) linking as possible
Diffstat (limited to 'lib/sisu/v2/html_segments.rb')
-rw-r--r--lib/sisu/v2/html_segments.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/sisu/v2/html_segments.rb b/lib/sisu/v2/html_segments.rb
index 83f9c5c9..bed30afa 100644
--- a/lib/sisu/v2/html_segments.rb
+++ b/lib/sisu/v2/html_segments.rb
@@ -166,9 +166,17 @@ module SiSU_HTML_seg
map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags
data.each do |dob|
if defined? dob.obj \
- and dob.obj =~/href="#{Xx[:segment]}#(\S+?)"/
- m=$1
- dob.obj.gsub!(/href="#{Xx[:segment]}#(\S+?)"/,%{href="#{map_nametags[m][:segname]}#{Sfx[:html]}#\\1"})
+ and dob.obj =~/href="#{Xx[:segment]}#+\S+?"/
+ while dob.obj =~/href="#{Xx[:segment]}#+(\S+?)"/
+ 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"})
+ else
+ p "NOT FOUND name_tags: #{m}"
+ dob.obj.sub!(/href="#{Xx[:segment]}#+(\S+?)"/,%{href="#\\1"}) # not satisfactory
+ end
+ end
end
if (dob.is=='heading' or dob.is=='heading_insert') \
and dob.ln==4