Class: SiSU_ConvertFootnotes::Make

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/sst_do_inline_footnotes.rb

Constant Summary collapse

@@endnote =
{}
@@endnote_array =
@@word_mode=[]
@@endnote_call_counter =
1
@@comment =
'%'
@@flag =
{ ['table_to']=>false }

Instance Method Summary collapse

Constructor Details

#initialize(md, data) ⇒ Make

Returns a new instance of Make.



181
182
183
184
185
186
187
188
# File 'lib/sisu/sst_do_inline_footnotes.rb', line 181

def initialize(md,data)
  @md,@data=md,data
  @@word_mode=[]
  @env=SiSU_Env::InfoEnv.new(@md.fns)
  l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
  @language=l[:n]
  @translate=SiSU_Translate::Source.new(@md,@language)
end

Instance Method Details

#resetObject



189
190
191
192
193
194
195
# File 'lib/sisu/sst_do_inline_footnotes.rb', line 189

def reset
  @@counter=@@column=@@columns=@@flag_vocab=0
  @@endnote={}
  @@endnote_array=@@word_mode=[]
  @@endnote_call_counter=1
  @@line_mode=''
end

#songObject



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/sisu/sst_do_inline_footnotes.rb', line 196

def song
  reset
  data=@data
  @metafile="#{@env.processing_path.ao}/#{@md.fns}.meta"
  SiSU_Env::CreateFile.new(@md.fns)
  data=data.join.split("\n\n")
  data_new=[]
  data.each do |x|
    data_new << (x =~ /\n\n/m) \
    ? (x.split(/\n\n+/))
    : x
  end
  data=data_new.flatten
  data=SiSU_ConvertFootnotes::Make.new(@md,data).character_check
  data=SiSU_ConvertFootnotes::Make.new(@md,data).endnotes
  SiSU_ConvertFootnotes::Output.new(@md,data).hard_output
  reset
  data
end