From 7010772e78d181be3a8ba304387d94b8f4825ea7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 9 Oct 2010 22:51:24 -0400 Subject: odt fix cornercase breakage matching and representing " ", "&" and urls (+changelog) * odf, " " and "&" (prior to this fix, odt for viral_spiral is broken in sisu-markup-samples) * shared_metadata, " ", "&" and urls in metadata more consistent open document text results --- lib/sisu/v2/odf.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v2/odf.rb') diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index 41229249..ad1f45d1 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -461,9 +461,9 @@ module SiSU_ODF word.each do |w| # _ - / # | : ! ^ ~ unless dob =~/^(?:#{Rx[:meta]}|%+ )/m w.gsub!(/&#(?:126|152);/,'~') #126 usual - if w !~/&\S{1,7};/ \ - or w =~/ / - w.gsub!(/&/,'&') #watch   + w.gsub!(/ /,' ') + if w !~/&\S{2,7}?;/ + w.gsub!(/&/,'&') end w.gsub!(/(&\S{1,7};)+&/,'\1&') #could break things end -- cgit v1.2.3