diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-13 11:26:57 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-13 11:26:57 +0100 |
commit | 48f576604b229255e221cdcd587f532b2bd014d6 (patch) | |
tree | 3ca4f9edb43c7e99c6dc02884a3295f1e72ff9cc /lib/sisu/v0/odf.rb | |
parent | sisu manual download page, clean (diff) |
underscore exception requires additional tweaking of regexes, solution not optimal (sisu_markup as basic test)
Diffstat (limited to 'lib/sisu/v0/odf.rb')
-rw-r--r-- | lib/sisu/v0/odf.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb index 171372a9..4884c33a 100644 --- a/lib/sisu/v0/odf.rb +++ b/lib/sisu/v0/odf.rb @@ -474,10 +474,9 @@ module SiSU_ODF para=para.strip end if para =~/<:code>/ #code-block: angle brackets special characters - para.gsub!(/(?=^|[^}])_</m,'<'); para.gsub!(/(?=^|[^}])_>/m,'>') + para.gsub!(/(^|[^}])_</m,'\1<'); para.gsub!(/(^|[^}])_>/m,'\1>') + para.gsub!(/(^|[^}])_</m,'\1<'); para.gsub!(/(^|[^}])_>/m,'\1>') 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 |