diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-12 20:30:33 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-12 20:30:33 +0100 |
commit | 6acc0270d1323cbdfd4a7c89377cdb7604895d63 (patch) | |
tree | 9231eae1a28ca9b0da6558d7adf15c27f7e62b46 /lib/sisu/v0/odf.rb | |
parent | xml 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.rb | 7 |
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,'<'); para.gsub!(/_>/m,'>') #code-block: angle brackets special characters - #para.gsub!(/</,'<'); para.gsub!(/>/,'>') + if para =~/<:code>/ #code-block: angle brackets special characters + para.gsub!(/(?=^|[^}])_</m,'<'); para.gsub!(/(?=^|[^}])_>/m,'>') + end + ##para.gsub!(/_</m,'<'); para.gsub!(/([^_])_>/m,'\1>') #code-block: angle brackets special characters + #para.gsub!(/_</m,'<'); para.gsub!(/_>/m,'>') #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 |