diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-09-05 01:24:49 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-09-05 01:24:49 -0400 |
commit | 9432d0345a982f2c64c684cc913b704cca5660f5 (patch) | |
tree | 969e72c8a68a9f01a6ab3c1e05e8d72697ca9fe5 /lib/sisu/v0/odf.rb | |
parent | dal, bullet footnotes fix (check numbered bullets, should also be ok) (diff) |
character given to represent non-break space in internal code (dal, constants and affected downstream code)
Diffstat (limited to 'lib/sisu/v0/odf.rb')
-rw-r--r-- | lib/sisu/v0/odf.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb index bf23f91f..d6558634 100644 --- a/lib/sisu/v0/odf.rb +++ b/lib/sisu/v0/odf.rb @@ -307,7 +307,7 @@ module SiSU_ODF para end def group_clean(para) - para.gsub!(/&nbsp;| /,' ') + para.gsub!(/&nbsp;| |#{Mx[:nbsp]}/,' ') para.gsub!(/</,'<'); para.gsub!(/>/,'>') para.gsub!(/<(text:span text:style-name="T[1-5]"|\/text:span)>/,'<\1>') #works, not ideal para.gsub!(/#{Mx[:br_line]}/,'<br />') @@ -447,9 +447,6 @@ module SiSU_ODF word=para.scan(/\S+|\n/) if word word.each do |w| # _ - / # | : ! ^ ~ - unless w =~/#{Mx[:id_o]}~\S+?;\S+?;\S+?#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}|#{Mx[:gr_o]}.+?#{Mx[:gr_c]}|<[:!][^<>]+?>/ - w.gsub!(/^<([^<>][^<>][^<>][^<>]+?)>$/,'<\1>') #refix - end unless para =~/^(?:#{Rx[:meta]}|%+ )/m w.gsub!(/&#(?:126|152);/,'~') #126 usual if w !~/&\S{1,7};/ \ @@ -488,12 +485,10 @@ module SiSU_ODF para.gsub!(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'<text:span text:style-name="T3">\1</text:span>') para.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'<text:span text:style-name="T4">\1</text:span>') para.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'<text:span text:style-name="T5">\1</text:span>') - para.gsub!(/[`’]/,"'") para.gsub!(//u,'-') para.gsub!(/ /u, ' ') # space identify para.gsub!(/ /u, ' ') # space identify para.gsub!(/·/u,'*') - para.gsub!(/[“”]/u,'""') para.gsub!(/[–—]/u,'-') #— – chk para.gsub!(/ < /i,'<') para.gsub!(/\\copy(?:right)?\b/,'©') |