module Amber::Markdown

Defined in:

amber/markdown.cr
amber/markdown/mappings/decode.cr
amber/markdown/node.cr
amber/markdown/options.cr
amber/markdown/parser.cr
amber/markdown/renderer.cr
amber/markdown/renderers/html_renderer.cr
amber/markdown/rule.cr
amber/markdown/utils.cr

Class Method Summary

Class Method Detail

def self.to_html(source : String, options = Options.new) : String #

[View source]
def self.to_html_with_toc(source : String, options = Options.new) : NamedTuple(html: String, toc: String) #

Renders markdown to HTML and also generates a table of contents. Returns a named tuple with :html and :toc keys. The :toc value is an HTML string containing a <ul> list of headings. The toc option on Options should be set to true for anchor links to be generated in the headings.


[View source]