aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-27 16:59:56 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-27 16:59:56 -0400
commitf5d98e3fdebd32abb5b3d9b428a8cc2ad66cef0c (patch)
tree7fe7f7b5981890771a044429502b382e1b435b7b /lib
parentepub_format, removed some title & author info, check (diff)
odf: lt (<), gt (>) fix for codeblocks; &amp fix, messy
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/odf.rb10
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 =~/&nbsp;/
w.gsub!(/&/,'&amp;') #watch &nbsp;
end
+ w.gsub!(/(&\S{1,7};)+&/,'\1&amp;') #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&lt;'); dob.obj.gsub!(/(^|[^}])_>/m,'\1&gt;')
- dob.obj.gsub!(/(^|[^}])_</m,'\1&lt;'); dob.obj.gsub!(/(^|[^}])_>/m,'\1&gt;')
+ dob.obj.gsub!(/(^|[^}])_(?:<|&lt;)/m,'\1&lt;'); dob.obj.gsub!(/(^|[^}])_(?:>|&gt;)/m,'\1&gt;')
+ dob.obj.gsub!(/(^|[^}])_(?:<|&lt;)/m,'\1&lt;'); dob.obj.gsub!(/(^|[^}])_(?:>|&gt;)/m,'\1&gt;')
end
if dob.of=='group'
dob.obj.gsub!(/#{Mx[:gl_bullet]}/,'● ')