module

Crhtml2markdown

TODO: Write documentation for Crhtml2markdown

Constants

BLOCK_ELEMENTS = Set {"p", "pre", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ul", "ol", "blockquote", "table", "dl", "details", "figure", "div", "section", "article", "nav", "header", "footer", "main", "aside", "address", "video", "audio"}
INLINE_ELEMENTS = Set {"p", "a", "em", "strong", "code", "span", "td", "th", "h1", "h2", "h3", "h4", "h5", "h6"}
VERSION = "0.1.0"

Class methods

convert(html : String) : String

Converts the provided HTML string into Markdown.

Individual HTML elements are handled by dedicated converter classes. Currently only headings (h1-h6) and plain text nodes are supported.

Source
convert_node(node : XML::Node, io : IO)
Source

Nested types