From e0c38cb8d044e0b3dc449e10d1aa14ef3b6900ad Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 19 Jun 2014 21:13:06 -0400 Subject: v6: docbook, ocn & footnote numbers (as xml comments) --- lib/sisu/v6/xml_shared.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sisu/v6/xml_shared.rb') diff --git a/lib/sisu/v6/xml_shared.rb b/lib/sisu/v6/xml_shared.rb index 033659f0..aeb73f22 100644 --- a/lib/sisu/v6/xml_shared.rb +++ b/lib/sisu/v6/xml_shared.rb @@ -460,7 +460,8 @@ module SiSU_XML_Munge clean(str) end def markup_docbook(dob='') # work on, initially a copy of fictionbook! - dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}(.+?)#{Mx[:en_a_c]}/m,'\1'). + dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}(\d+)\s*(.+?)#{Mx[:en_a_c]}/m,'\2'). + gsub(/\\\\/,''). gsub(/&/,'&'). #sort gsub(/#{Mx[:mk_o]}#([a-zA-Z]+)#{Mx[:mk_c]}/,'&\1;'). gsub(/(^|#{Mx[:gl_c]}|\s)&\s+/,'\1& '). #sort -- cgit v1.2.3