316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
# File 'lib/amp-front/third_party/maruku/output/to_html.rb', line 316
def ()
div = Element.new 'div'
div.attributes['class'] = 'footnotes'
div << Element.new('hr')
ol = Element.new 'ol'
@doc..each_with_index do |fid, i| num = i+1
f = self.[fid]
if f
li = f.wrap_as_element('li')
li.attributes['id'] = "#{get_setting(:doc_prefix)}fn:#{num}"
a = Element.new 'a'
a.attributes['href'] = "\##{get_setting(:doc_prefix)}fnref:#{num}"
a.attributes['rev'] = 'footnote'
a<< Text.new('↩', true, nil, true)
li.insert_after(li.children.last, a)
ol << li
else
maruku_error "Could not find footnote id '#{fid}' among ["+
self..keys.map{|s|"'"+s+"'"}.join(', ')+"]."
end
end
div << ol
div
end
|