# File lib/maruku/output/to_html.rb, line 844 def to_html_footnote_reference id = self.footnote_id # save the order of used footnotes order = @doc.footnotes_order if order.include? id # footnote has already been used return [] end if not @doc.footnotes[id] return [] end # take next number order << id #num = order.size; num = order.index(id) + 1 sup = Element.new 'sup' sup.attributes['id'] = "#{get_setting(:doc_prefix)}fnref:#{num}" a = Element.new 'a' a << Text.new(num.to_s) a.attributes['href'] = "\##{get_setting(:doc_prefix)}fn:#{num}" a.attributes['rel'] = 'footnote' sup << a sup end