Class: Typedown2Blog::HtmlDocument

Inherits:
BlogFormatter show all
Defined in:
lib/typedown2blog/formatters.rb

Instance Method Summary collapse

Methods inherited from BlogFormatter

#initialize

Constructor Details

This class inherits a constructor from Typedown2Blog::BlogFormatter

Instance Method Details

#format_body(typedown) ⇒ Object



28
29
30
31
32
# File 'lib/typedown2blog/formatters.rb', line 28

def format_body typedown
  doc = Typedown::Section.sectionize(typedown)
  body = "<html>\n<body>\n#{doc.body.to_html}\n</body>\n</html>\n\n"
  [ doc.title, body, "text/html" ]
end