diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-05-26 13:18:31 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-05-26 13:18:31 -0400 |
commit | fec639c59a032977b87ff49920e74ae08d485f04 (patch) | |
tree | 938c32c8a74fe39177afb5255ac229c599e0186b /lib/sisu/v2/shared_xml.rb | |
parent | sysenv, require constants, (issue with webrick) (diff) |
output formats internal document (and relative) linking as possible
Diffstat (limited to 'lib/sisu/v2/shared_xml.rb')
-rw-r--r-- | lib/sisu/v2/shared_xml.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sisu/v2/shared_xml.rb b/lib/sisu/v2/shared_xml.rb index 8a58909b..4d504882 100644 --- a/lib/sisu/v2/shared_xml.rb +++ b/lib/sisu/v2/shared_xml.rb @@ -372,6 +372,8 @@ module SiSU_XML_munge dob.obj.gsub!(/href="#{Xx[:segment]}/m,'href="') dob.obj.gsub!(/#{Mx[:lnk_o]}([^#{Mx[:lnk_o]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{Mx[:rel_c]}]+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}(\.\.\/\S+?)#{Mx[:rel_c]}/, '<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\2">\1</link>') + dob.obj.gsub!(/#{Mx[:lnk_o]}([^#{Mx[:lnk_o]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{Mx[:rel_c]}]+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}:(\S+?)#{Mx[:rel_c]}/, + '<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="../\2">\1</link>') dob.obj.gsub!(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}(\S+?)#{Mx[:rel_c]}/, '<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="#\2">\1</link>') dob.obj.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}[ ]*(\S+?\.(?:jpg|png|gif))[ ]+(\d+)x(\d+)(\s+[^}]+)?#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/, |