From 804d1054c375bb6e6887c8d61ac5135a3449b552 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 22 Mar 2010 20:08:09 -0400 Subject: odf, shared_xml, texpdf: grouped bulleted text --- lib/sisu/v2/odf.rb | 5 ++++- lib/sisu/v2/shared_xml.rb | 3 +++ lib/sisu/v2/texpdf.rb | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index c51eab90..d4aeb616 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -418,10 +418,13 @@ module SiSU_ODF dob.obj=para_array.join(' ') dob.obj=dob.obj.strip end - if dob.obj =~/#{Mx[:gr_o]}code#{Mx[:gr_c]}/ #fix #code-block: angle brackets special characters #fix + 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>') end + if dob.of=='group' + dob.obj.gsub!(/#{Mx[:gl_bullet]}/,'● ') + end dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1') dob.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'\1') dob.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'\1') diff --git a/lib/sisu/v2/shared_xml.rb b/lib/sisu/v2/shared_xml.rb index d70e0808..8a58909b 100644 --- a/lib/sisu/v2/shared_xml.rb +++ b/lib/sisu/v2/shared_xml.rb @@ -392,6 +392,9 @@ module SiSU_XML_munge dob.obj.gsub!(/(^|[^}])_/m,'\1>') #code-block: angle brackets special characters dob.obj.gsub!(/(^|[^}])_/m,'\1>') end + if dob.of=='group' + dob.obj.gsub!(/#{Mx[:gl_bullet]}/,'● ') + end dob.obj.gsub!(/#{Dx[:url_o]}/,"#{Dx[:url_o_xml]}") dob.obj.gsub!(/#{Dx[:url_c]}/,"#{Dx[:url_c_xml]}") dob.obj.gsub!(/ |#{Mx[:nbsp]}/m,' ') diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb index 00a4d16d..f0e04b33 100644 --- a/lib/sisu/v2/texpdf.rb +++ b/lib/sisu/v2/texpdf.rb @@ -413,6 +413,7 @@ module SiSU_TeX @lineone=case dob.is when /alt|group|verse/ dob.tmp.gsub!(/#{Mx[:nbsp]}/m,'{~}') + dob.tmp.gsub!(/#{Mx[:gl_bullet]}/m,'$\txtbullet$~~') dob.tmp.gsub!(/#{Mx[:br_nl]}+/m,"\n\n") #match not ideal, but currently not inserting extra newlines anyway ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob) dob.tmp=if dob.is=='group' \ -- cgit v1.2.3