aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html_segments.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-05-26 15:40:01 -0400
committerRalph Amissah <ralph@amissah.com>2010-05-26 15:40:01 -0400
commitc142eedb1854395c4b31bbb4852ca5e10fbaea70 (patch)
tree05f582c5129f7c82be2ae2b42317a5c68f1f770b /lib/sisu/v2/html_segments.rb
parentdebian/changelog (2.3.5-1) (diff)
parentupdate: changelog, version (2.4.0) (diff)
Merge branch 'upstream' into debian/sid
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