diff options
| author | Ralph Amissah <ralph@amissah.com> | 2010-07-27 16:59:56 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2010-07-27 16:59:56 -0400 | 
| commit | f5d98e3fdebd32abb5b3d9b428a8cc2ad66cef0c (patch) | |
| tree | 7fe7f7b5981890771a044429502b382e1b435b7b | |
| parent | epub_format, removed some title & author info, check (diff) | |
odf: lt (<), gt (>) fix for codeblocks; & fix, messy
| -rw-r--r-- | lib/sisu/v2/odf.rb | 10 | 
1 files 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>') +            dob.obj.gsub!(/(^|[^}])_(?:<|<)/m,'\1<'); dob.obj.gsub!(/(^|[^}])_(?:>|>)/m,'\1>')            end            if dob.of=='group'              dob.obj.gsub!(/#{Mx[:gl_bullet]}/,'● ') | 
