aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/odf.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb
index aa514a90..874f87e1 100644
--- a/lib/sisu/v0/odf.rb
+++ b/lib/sisu/v0/odf.rb
@@ -474,6 +474,9 @@ module SiSU_ODF
word=para.scan(/\S+|\n/)
if word
word.each do |w| # _ - / # | : ! ^ ~
+ unless w =~/<~\S+?;\S+?;\S+?><#@dp:#@dp>|<[:!][^<>]+?>|^<\/?(?:del|ins|sub|sup|cite)>$/
+ w.gsub!(/^<([^<>][^<>][^<>][^<>]+?)>$/,'&lt;\1&gt;') #refix
+ end
unless para =~/^(?:0~|%+ )/m
w.gsub!(/&#(?:126|152);/,'~') #126 usual
if w !~/&\S{1,7};/ \
@@ -495,7 +498,7 @@ module SiSU_ODF
#para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1● ') # bullet utf8, make smaller if used
#para.gsub!(/^_\*\s+/,'<text:span text:style-name="T6">●</text:span> ') #bullet
para.gsub!(/^(<:i[1-9]>)\s+_\*\s+/,'\1 <text:span text:style-name="T6">·</text:span> ') #bullet
- para.gsub!(/<br>/,'<br />')
+ para.gsub!(/<:?br>/,'<br />')
para.gsub!(/<:p[bn]>/,'<text:p text:style-name="P8"> </text:p>')
para.gsub!(/&#169;/,'©') #too arbitrary
para.gsub!(/.+?<-#>/,'') # remove dummy headings (used by html) #check