aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/xml_shared.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-03 00:30:50 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-03 00:30:50 -0500
commit9700518408f388c9f070894f7986d94d80e4c070 (patch)
tree50fcd8c17a761ab47001cb6c7be298e1708ad7d7 /lib/sisu/v5/xml_shared.rb
parentv5: xml, docbook (diff)
v5: xml, fictionbook
Diffstat (limited to 'lib/sisu/v5/xml_shared.rb')
-rw-r--r--lib/sisu/v5/xml_shared.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sisu/v5/xml_shared.rb b/lib/sisu/v5/xml_shared.rb
index 688e34c3..a6092559 100644
--- a/lib/sisu/v5/xml_shared.rb
+++ b/lib/sisu/v5/xml_shared.rb
@@ -435,7 +435,7 @@ module SiSU_XML_Munge
gsub(/#{Mx[:gl_o]}#([a-z]{2,4})#{Mx[:gl_c]}/u,'&\1;')
end
def markup_fictionbook(str='',is='')
- str=str.gsub(/#{Mx[:en_a_o]}([\d+*]+).+?#{Mx[:en_a_c]}/m,'<a xlink:href="#footnote\1" type="note">[\1]</a>').
+ str=str.gsub(/#{Mx[:en_a_o]}([\d+*]+).+?#{Mx[:en_a_c]}/m,'<a xl:href="#footnote\1" type="note">[\1]</a>').
gsub(/&/,'&amp;'). #sort
gsub(/#{Mx[:mk_o]}#([a-zA-Z]+)#{Mx[:mk_c]}/,'&\1;').
gsub(/(^|#{Mx[:gl_c]}|\s)&\s+/,'\1&amp; '). #sort
@@ -450,11 +450,11 @@ module SiSU_XML_Munge
gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'<cite>\1</cite>').
gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>').
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,'<image xlink:href="#\1" />').
+ 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,'<image xl:href="#\1" />').
gsub(/#{Mx[:url_o]}(.+?)#{Mx[:url_c]}/,"#{Dx[:url_o]}\\1#{Dx[:url_c]}").
gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'<a name="\1"></a>').
- gsub(/#{Mx[:gl_bullet]}/m,'●&nbsp;&nbsp;').
- gsub(/#{Mx[:nbsp]}/,'&nbsp;').
+ gsub(/#{Mx[:gl_bullet]}/m,'● '). #&nbsp; not available
+ gsub(/#{Mx[:nbsp]}/,' '). #&nbsp; not available
gsub(/<(p|br)>/,'<\1 />')
clean(str)
end