== Markdown Malt supports Markdown via either the RDiscount, BlueCloth or Kramdown backends. Lets say we have a Markdown document called 'test.md' containing ... # Example This is an example of Markdown rendering. Markdown documents are recognized by the +.markdown+ or +.md+ file extensions. html = Malt.render(:file=>'tmp/test.md') html.assert.include?('

Example

') By default teh RDiscount library is used to render markdown documents, but Malt supports BlueCloth and Kramdown as well. These case be used by setting the :engine option. html = Malt.render(:file=>'tmp/test.md', :engine=>:bluecloth) And as we can see the document rendered as expected. html.assert.include?('

Example

') And using the Kramdown library, html = Malt.render(:file=>'tmp/test.md', :engine=>:kramdown) We can see the document rendered as well, though notice that Kramdown provides some bonus features compared to the other rendering engines. html.assert.include?('

Example

') Malt supports Markdown via either the RDiscount, BlueCloth or Kramdown backends. Lets say we have an Markdown document called 'test.md' containing ... # Example This is an example of Markdown rendering. We can access the file via the +Malt.file+ method. Markdown documents are recognized by the +.markdown+ or +.md+ file extensions. mark = Malt.file('tmp/test.md') We can the convert the document to a Malt Html object via the #to_html method. html = mark.to_html Notice that the output is an instance of Malt::Format::HTML. html.class.assert == Malt::Format::HTML And that by calling #to_s we can get the rendered HTML document. html.to_s.assert.include?('

Example

') Or we can convert the document directly to HTML via the #html method. out = mark.html out.assert.include?('

Example

')