From 66d81556302cae1c9c69507e2458f1406dcae831 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 31 Dec 2011 08:35:25 -0500 Subject: v3: html, epub, (& xml) codeblocks, treatment of '<<' & '>>', fix * (remove legacy codeblock match rule, watch) --- lib/sisu/v3/epub_tune.rb | 3 +-- lib/sisu/v3/html_tune.rb | 3 +-- lib/sisu/v3/shared_html_lite.rb | 3 +-- lib/sisu/v3/shared_markup_alt.rb | 3 +-- lib/sisu/v3/shared_xml.rb | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/epub_tune.rb b/lib/sisu/v3/epub_tune.rb index fedef1b3..5f50bb39 100644 --- a/lib/sisu/v3/epub_tune.rb +++ b/lib/sisu/v3/epub_tune.rb @@ -356,8 +356,7 @@ module SiSU_EPUB_Tune end dob.obj.gsub!(//m,'\1>') #code-block: angle brackets special characters - dob.obj.gsub!(/(^|[^}])_/m,'\1>') + dob.obj.gsub!(//m,'>') end @tuned_file << dob end diff --git a/lib/sisu/v3/html_tune.rb b/lib/sisu/v3/html_tune.rb index afedec54..bc833eaa 100644 --- a/lib/sisu/v3/html_tune.rb +++ b/lib/sisu/v3/html_tune.rb @@ -317,8 +317,7 @@ module SiSU_HTML_Tune dob.obj.gsub!(//m,'\1>') #code-block: angle brackets special characters - dob.obj.gsub!(/(^|[^}])_/m,'\1>') + dob.obj.gsub!(//m,'>') end dob end diff --git a/lib/sisu/v3/shared_html_lite.rb b/lib/sisu/v3/shared_html_lite.rb index 0dd13a34..33052cd2 100644 --- a/lib/sisu/v3/shared_html_lite.rb +++ b/lib/sisu/v3/shared_html_lite.rb @@ -165,8 +165,7 @@ module SiSU_Format_Shared s.gsub!(/(#{Mx[:lnk_c]})#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1\2') #special case \{ e.g. \}http://url s.gsub!(/(^|#{Mx[:gl_c]}|\s)#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{\\1#{@brace_url.xml_open}\\2#{@brace_url.xml_close}\\3}) #http ftp matches with decoration else - s.gsub!(/(^|[^}])_/m,'\1>') #code-block: angle brackets special characters - s.gsub!(/(^|[^}])_/m,'\1>') + s.gsub!(//m,'>') end s end diff --git a/lib/sisu/v3/shared_markup_alt.rb b/lib/sisu/v3/shared_markup_alt.rb index a7d08cae..5bd49342 100644 --- a/lib/sisu/v3/shared_markup_alt.rb +++ b/lib/sisu/v3/shared_markup_alt.rb @@ -174,8 +174,7 @@ module SiSU_text_representation @s=@s.gsub(/(#{Mx[:lnk_c]})#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1\2\3') #special case \{ e.g. \}http://url @s=@s.gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{#{@url_brace.xml_open}\\1#{@url_brace.xml_close}}) #http ftp matches with decoration else - @s=@s.gsub(/(^|[^}])_/m,'\1>') #code-block: angle brackets special characters - @s=@s.gsub(/(^|[^}])_/m,'\1>') + @s=@s.gsub(//m,'>') end if @t_o.is=='paragraph' if @t_o.bullet_ diff --git a/lib/sisu/v3/shared_xml.rb b/lib/sisu/v3/shared_xml.rb index f6cd6598..f4fa395c 100644 --- a/lib/sisu/v3/shared_xml.rb +++ b/lib/sisu/v3/shared_xml.rb @@ -392,8 +392,7 @@ module SiSU_XML_munge dob.obj.gsub!(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/, '\1') #escaped urls not linked, deal with later else - dob.obj.gsub!(/(^|[^}])_/m,'\1>') #code-block: angle brackets special characters - dob.obj.gsub!(/(^|[^}])_/m,'\1>') + dob.obj.gsub!(//m,'>') end if dob.of=='block' dob.obj.gsub!(/#{Mx[:gl_bullet]}/,'● ') -- cgit v1.2.3