aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-07-15 18:42:44 -0400
committerRalph Amissah <ralph@amissah.com>2014-07-15 18:42:44 -0400
commit8a09a5fc3705ec645c92d7f271db5027f0656b15 (patch)
treed2fd493eab1333405fa85b3c6be6f7d735d2b0dd /lib
parentv5 v6: docbook, code & other blocks markup (diff)
v5 v6: docbook, url links, urls
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v5/xml_shared.rb5
-rw-r--r--lib/sisu/v6/xml_shared.rb5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/sisu/v5/xml_shared.rb b/lib/sisu/v5/xml_shared.rb
index 5670f68d..423044bc 100644
--- a/lib/sisu/v5/xml_shared.rb
+++ b/lib/sisu/v5/xml_shared.rb
@@ -479,7 +479,10 @@ module SiSU_XML_Munge
gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>'). # tt, kbd
gsub(/#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)).+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/m,
%{#{Xx[:split]}:spaces0:<figure id="\\1">\n:spaces1:<title></title>\n:spaces1:<graphic fileref="images/\\1" align="center" width="50%"></graphic>\n:spaces0:</figure>#{Xx[:split]}}).
- gsub(/#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,"#{Dx[:url_o]}\\1#{Dx[:url_c]}").
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,
+ '<ulink url="\2">\1</ulink>').
+ gsub(/#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,
+ '<ulink url="\1">\1</ulink>').
gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'<a name="\1"></a>').
gsub(/#{Mx[:gl_bullet]}/m,'● '). #&nbsp; not available
gsub(/#{Mx[:nbsp]}/,' '). #&nbsp; not available
diff --git a/lib/sisu/v6/xml_shared.rb b/lib/sisu/v6/xml_shared.rb
index 8f4024eb..cef46c92 100644
--- a/lib/sisu/v6/xml_shared.rb
+++ b/lib/sisu/v6/xml_shared.rb
@@ -479,7 +479,10 @@ module SiSU_XML_Munge
gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>'). # tt, kbd
gsub(/#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)).+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/m,
%{#{Xx[:split]}:spaces0:<figure id="\\1">\n:spaces1:<title></title>\n:spaces1:<graphic fileref="images/\\1" align="center" width="50%"></graphic>\n:spaces0:</figure>#{Xx[:split]}}).
- gsub(/#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,"#{Dx[:url_o]}\\1#{Dx[:url_c]}").
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,
+ '<ulink url="\2">\1</ulink>').
+ gsub(/#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,
+ '<ulink url="\1">\1</ulink>').
gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'<a name="\1"></a>').
gsub(/#{Mx[:gl_bullet]}/m,'● '). #&nbsp; not available
gsub(/#{Mx[:nbsp]}/,' '). #&nbsp; not available