aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/odf.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-12-13 22:05:41 -0500
committerRalph Amissah <ralph@amissah.com>2011-12-13 22:06:52 -0500
commit0607a1bd8727ed7c482fcfb0e4c4002cd24eca72 (patch)
tree9bd0224166edae23730a8d6e618a002d3d446031 /lib/sisu/v3/odf.rb
parentv3: 3.1.8 version & changelog "opened" (diff)
v3: odf:odt, codeblocks, a match fix, affects e.g. "<<"
Diffstat (limited to 'lib/sisu/v3/odf.rb')
-rw-r--r--lib/sisu/v3/odf.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb
index b7b747ee..7d4fa309 100644
--- a/lib/sisu/v3/odf.rb
+++ b/lib/sisu/v3/odf.rb
@@ -535,10 +535,12 @@ module SiSU_ODF
unless dob =~/^(?:#{Rx[:meta]}|%+ )/m
w.gsub!(/&#(?:126|152);/,'~') #126 usual
w.gsub!(/&nbsp;/,'&#160;')
- if w !~/&\S{2,7}?;/
+ if w !~/(?:&\S{2,7}?;)+/
w.gsub!(/&/,'&amp;')
end
- w.gsub!(/(&\S{1,7};)+&/,'\1&amp;') #could break things
+ if w !~/&\S{1,7}?;(?:&\S{1,7}?;)+/ #imperfect
+ w.gsub!(/(&\S{1,7};)+&/,'\1&amp;')
+ end
end
para_array << w
end