Method: RDoc::RD::BlockParser#add_footnote

Defined in:
lib/rdoc/rd/block_parser.rb

#add_footnote(content) ⇒ Object

Adds footnote content to the document



396
397
398
399
400
401
402
403
404
405
# File 'lib/rdoc/rd/block_parser.rb', line 396

def add_footnote content
  index = @footnotes.length / 2 + 1

  footmark_link = "{^#{index}}[rdoc-label:footmark-#{index}:foottext-#{index}]"

  @footnotes << RDoc::Markup::Paragraph.new(footmark_link, ' ', *content)
  @footnotes << RDoc::Markup::BlankLine.new

  index
end