From 9432d0345a982f2c64c684cc913b704cca5660f5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 5 Sep 2008 01:24:49 -0400 Subject: character given to represent non-break space in internal code (dal, constants and affected downstream code) --- lib/sisu/v0/shared_xml.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v0/shared_xml.rb') diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb index 7ecc52bb..437f5482 100644 --- a/lib/sisu/v0/shared_xml.rb +++ b/lib/sisu/v0/shared_xml.rb @@ -422,12 +422,12 @@ module SiSU_XML_munge %{\\1#{@url_brace.xml_open}\\2#{@url_brace.xml_close}\\3}) para.gsub!(/\b[_\\]((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/, '\1\2') #escaped urls not linked, deal with later - para.gsub!(/ /,' ') + para.gsub!(/ |#{Mx[:nbsp]}/,' ') #para.gsub!(/ /,' ') #clean else para.gsub!(/(^|[^}])_/m,'\1>') #code-block: angle brackets special characters para.gsub!(/(^|[^}])_/m,'\1>') - para.gsub!(/ /,' ') + para.gsub!(/ |#{Mx[:nbsp]}/,' ') end para end @@ -443,7 +443,7 @@ module SiSU_XML_munge para.gsub!(/&([^;]{1,5})/,'&\1') #sort, rough estimate, revisit #WATCH found in node not sax para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\/\/\S+|image)/, "#{@dir.url.images_local}\/\\1") - para.gsub!(/ /,' ') + para.gsub!(/ |#{Mx[:nbsp]}/,' ') #para.gsub!(/ /,' ') #clean wordlist=para.scan(/&[#0-9a-z]+;|\S+|\n/) #\n needed for tables, check though added 2005w17 para=tidywords(wordlist).join(' ').strip @@ -466,7 +466,7 @@ module SiSU_XML_munge para.gsub!(/&([^;]{1,5})/,'&\1') #sort, rough estimate, revisit #WATCH found in node not sax para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\/\/\S+|image)/, "#{@dir.url.images_local}\/\\1") - para.gsub!(/ /,' ') + para.gsub!(/ |#{Mx[:nbsp]}/,' ') #para.gsub!(/ /,' ') #clean wordlist=para.scan(/&[#0-9a-z]+;|\S+|\n/) #\n needed for tables, check though added 2005w17 para=tidywords(wordlist).join(' ').strip -- cgit v1.2.3