Module: Hemingway::EntryNode

Defined in:
lib/hemingway/latex_nodes.rb

Instance Method Summary collapse

Instance Method Details

#htmlObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/hemingway/latex_nodes.rb', line 4

def html
  footnote_content = []
  paragraph_html = ""

  elements.each do |e|
    # Time.now.to_f => 123123.1231231
    time = Time.now.to_f.to_s.gsub(".", "-")
    paragraph_html += e.html(footnote_content.size, time)
    footnote_content += e.footnote_html(footnote_content.size, time)
  end

  footnote_html = footnote_content.join

  Build.tag("div", paragraph_html + footnote_html, :class => "entry")
end