class SiSU_XHTML_EPUB2::Source::Endnotes
Public Class Methods
new(md,data)
click to toggle source
# File lib/sisu/xhtml_epub2.rb, line 172 def initialize(md,data) @md,@data=md,data end
Public Instance Methods
scroll()
click to toggle source
# File lib/sisu/xhtml_epub2.rb, line 175 def scroll @scr_endnotes=[] @data.each do |dob| pg=dob.dup unless pg.is ==:code if pg.obj =~/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})[\d*+]+ / endnote_array=[] if pg.obj=~/#{Mx[:en_a_o]}[\d*+].+?#{Mx[:en_a_c]}/m endnote_array = pg.obj.scan(/#{Mx[:en_a_o]}[\d*+]+(.+?)#{Mx[:en_a_c]}/m) end if pg.obj=~/#{Mx[:en_b_o]}[\d*]+\s.+?#{Mx[:en_b_c]}/m endnote_array = pg.obj.scan(/#{Mx[:en_b_o]}[\d*]+(.+?)#{Mx[:en_b_c]}/m) end if pg.obj=~/#{Mx[:en_b_o]}[\d+]+\s.+?#{Mx[:en_b_c]}/m endnote_array = pg.obj.scan(/#{Mx[:en_b_o]}[\d+]+(.+?)#{Mx[:en_b_c]}/m) end endnote_array.flatten.each do |note| txt_obj={ txt: note } format_scroll=SiSU_XHTML_EPUB2_Format::FormatScroll.new(@md,txt_obj) @scr_endnotes << format_scroll.endnote_body end end end end @scr_endnotes end