aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html_segments.rb
diff options
context:
space:
mode:
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