aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-28 13:30:14 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-28 13:30:14 -0400
commit3d092a1c809e87c9f220954cd78c82c29f1bd899 (patch)
tree1a2b3eadc9ffa7e3a636cc62c0a4645575f7282e
parenthtml_format, epub_format: subtoc, footnote content bug (fix) (diff)
odf, footnotes, asterisk series (**) fix
-rw-r--r--lib/sisu/v2/odf.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb
index de010f3b..bb071683 100644
--- a/lib/sisu/v2/odf.rb
+++ b/lib/sisu/v2/odf.rb
@@ -315,9 +315,15 @@ module SiSU_ODF
end
if str
@astx||=10000
+ @astxs||=20000
if str =~/#{Mx[:en_a_o]}\d+\s+/
str.gsub!(/#{Mx[:en_a_o]}(\d+)\s+(.+?)#{Mx[:en_a_c]}/,'<text:note text:id="ftn\1" text:note-class="footnote"><text:note-citation>\1</text:note-citation><text:note-body><text:p text:style-name="Footnote"> \2</text:p><text:p text:style-name="Footnote"/></text:note-body></text:note>')
end
+ if str =~/#{Mx[:en_a_o]}([*]+)\s+/
+ a=$1.gsub(/([*])/,"\\\\\\1")
+ str.gsub!(/#{Mx[:en_a_o]}([*]+)\s+(.+?)#{Mx[:en_a_c]}/,%{<text:note text:id="ftn#{@astx.to_s}" text:note-class="footnote"><text:note-citation text:label="\\1">\\1</text:note-citation><text:note-body><text:p text:style-name="Footnote"> \\2</text:p><text:p text:style-name="Footnote"/></text:note-body></text:note>})
+ @astxs+=1
+ end
if str=~/#{Mx[:en_a_o]}[*+]+\s/
asterisk=str.scan(/#{Mx[:en_a_o]}([*+]+)\s+(.+?)#{Mx[:en_a_c]}/)
asterisk.each do |x|