class SiSU_HTML::Source::Endnotes

Public Class Methods

new(data,md) click to toggle source
# File lib/sisu/html.rb, line 225
def initialize(data,md)
  @data,@md=data,md
end

Public Instance Methods

scroll() click to toggle source
# File lib/sisu/html.rb, line 228
def scroll
  @scr_endnotes=[]
  SiSU_HTML_Format::HeadScroll.new(@md)
  @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_HTML_Format::FormatScroll.new(@md,txt_obj)
          @scr_endnotes << format_scroll.endnote_body
        end
      end
    end
  end
  @scr_endnotes
end