From 8fe365726f3bb7866a7a9285cb5045c50c39fd67 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 31 Jan 2013 18:36:08 -0500 Subject: v4: epub, constants, debug alternative for various readers ... work on --- lib/sisu/v4/epub_tune.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/sisu/v4/epub_tune.rb') diff --git a/lib/sisu/v4/epub_tune.rb b/lib/sisu/v4/epub_tune.rb index b64fd675..f34db8ff 100644 --- a/lib/sisu/v4/epub_tune.rb +++ b/lib/sisu/v4/epub_tune.rb @@ -103,7 +103,7 @@ module SiSU_EPUB_Tune str=str.gsub(/#{Mx[:gl_o]}(#[0-9]{3})#{Mx[:gl_c]}/u,'&\1;'). gsub(/#{Mx[:gl_o]}#([a-z]{2,4})#{Mx[:gl_c]}/u,'&\1;'). gsub(/
/u,'
'). - gsub(/#{Mx[:nbsp]}/u,' ') + gsub(/#{Mx[:nbsp]}/u,$ep[:hsp]) end end class Tune @@ -151,8 +151,8 @@ module SiSU_EPUB_Tune gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1'). gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\1'). # tt, kbd gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). - gsub(/#{Mx[:gl_bullet]}/m,'●  '). - gsub(/#{Mx[:nbsp]}/,' '). + gsub(/#{Mx[:gl_bullet]}/m,"●#{$ep[:hsp]*2}"). + gsub(/#{Mx[:nbsp]}/,$ep[:hsp]). gsub(/<(p|br)>/,'<\1 />') dob.obj=SiSU_EPUB_Tune::CleanXHTML.new(dob.obj).clean @tuned_file << dob @@ -253,9 +253,9 @@ module SiSU_EPUB_Tune %{\n
\\3
\n}) end dob.obj=dob.obj.gsub(/!pick/,%{stellar}). - gsub(/!new/,%{ new}). + gsub(/!new/,%{#{$ep[:hsp]}new}). gsub(/<:h(.{1,7}?)>/,'\1'). - gsub(/<:to(\d{1,7}?)>/,'to { \1 } '). + gsub(/<:to(\d{1,7}?)>/,%{to#{$ep[:hsp]}\{#{$ep[:hsp]}\\1#{$ep[:hsp]}\} }). gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1'). #http ftp matches escaped, no decoration gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,%{#{@brace_url.xml_open}\\1#{@brace_url.xml_close}}). gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{#{@brace_url.xml_open}\\1#{@brace_url.xml_close}}) #http ftp matches with decoration -- cgit v1.2.3