aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/odf.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-12 20:30:33 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-12 20:30:33 +0100
commit6acc0270d1323cbdfd4a7c89377cdb7604895d63 (patch)
tree9231eae1a28ca9b0da6558d7adf15c27f7e62b46 /lib/sisu/v0/odf.rb
parentxml dom extract footnote from grouped text (diff)
special character exceptions, some fixes, primarily underscore
Diffstat (limited to 'lib/sisu/v0/odf.rb')
-rw-r--r--lib/sisu/v0/odf.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb
index 610a51aa..171372a9 100644
--- a/lib/sisu/v0/odf.rb
+++ b/lib/sisu/v0/odf.rb
@@ -473,8 +473,11 @@ module SiSU_ODF
para=para_array.join(' ')
para=para.strip
end
- para.gsub!(/_</m,'&lt;'); para.gsub!(/_>/m,'&gt;') #code-block: angle brackets special characters
- #para.gsub!(/</,'&lt;'); para.gsub!(/>/,'&gt;')
+ if para =~/<:code>/ #code-block: angle brackets special characters
+ para.gsub!(/(?=^|[^}])_</m,'&lt;'); para.gsub!(/(?=^|[^}])_>/m,'&gt;')
+ end
+ ##para.gsub!(/_</m,'&lt;'); para.gsub!(/([^_])_>/m,'\1&gt;') #code-block: angle brackets special characters
+ #para.gsub!(/_</m,'&lt;'); para.gsub!(/_>/m,'&gt;') #code-block: angle brackets special characters
para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1<draw:frame draw:style-name="gr1" text:anchor-type="as-char" svg:width="0.22cm" svg:height="0.22cm" draw:z-index="2"><draw:image xlink:href="Pictures/bullet_09.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></draw:frame> ') # bullet_09.png
#para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1<text:span text:style-name="T6">●</text:span> ') #bullet
#para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\1● ') # bullet utf8, make smaller if used