From f5d98e3fdebd32abb5b3d9b428a8cc2ad66cef0c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 27 Jul 2010 16:59:56 -0400 Subject: odf: lt (<), gt (>) fix for codeblocks; & fix, messy --- lib/sisu/v2/odf.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index 2c0e206b..de010f3b 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -113,9 +113,8 @@ module SiSU_ODF @vz=SiSU_Env::Get_init.instance.skin @tab="\t" @brace_url=SiSU_Viz::Skin.new.url_decoration - @br=if @md.cmd =~/M/; "\n" - else '' - end + @br=(@md.cmd =~/M/) ? '' : '' + #@br=(@md.cmd =~/M/) ? "\n" : '' end def songsheet pre @@ -459,6 +458,7 @@ module SiSU_ODF or w =~/ / w.gsub!(/&/,'&') #watch   end + w.gsub!(/(&\S{1,7};)+&/,'\1&') #could break things end para_array << w end @@ -466,8 +466,8 @@ module SiSU_ODF dob.obj=dob.obj.strip end if dob.is=='code' #{Mx[:gr_o]}code#{Mx[:gr_c]}/ #fix #code-block: angle brackets special characters #fix - dob.obj.gsub!(/(^|[^}])_/m,'\1>') - dob.obj.gsub!(/(^|[^}])_/m,'\1>') + dob.obj.gsub!(/(^|[^}])_(?:<|<)/m,'\1<'); dob.obj.gsub!(/(^|[^}])_(?:>|>)/m,'\1>') + dob.obj.gsub!(/(^|[^}])_(?:<|<)/m,'\1<'); dob.obj.gsub!(/(^|[^}])_(?:>|>)/m,'\1>') end if dob.of=='group' dob.obj.gsub!(/#{Mx[:gl_bullet]}/,'● ') -- cgit v1.2.3