class Mint::VDOMRenderer

Overview

This is a Virtual DOM renderer for markdown using Markd shard.

The AST for the markdown is a tree where each node refers to the parent node, next sibling and previous sibling.

We walk the nodes and create virtual dom nodes using the _h function. The tag_end(node) function closes a call with or without a comma , depending if the node has a next sibling.

Defined in:

utils/markd_vdom_renderer.cr

Constant Summary

HEADINGS = ["h1", "h2", "h3", "h4", "h5", "h6"] of ::String

Instance Method Summary

Instance Method Detail

def block_quote(node, entering) #

[View source]
def code(node, entering) #

[View source]
def code_block(node, entering) #

[View source]
def document(node, entering) #

[View source]
def emphasis(node, entering) #

[View source]
def heading(node, entering) #

[View source]
def image(node, entering) #

[View source]
def io : String::Builder #

Io contains the end result.


[View source]
def item(node, entering) #

[View source]
def line_break(node, entering) #

[View source]
def link(node, entering) #

[View source]
def list(node, entering) #

[View source]
def paragraph(node, entering) #

[View source]
def render(document : Markd::Node) #

[View source]
def skip_next=(skip_next : Bool) #

Skip next is used to skip rendering of the next node.


[View source]
def skip_next? : Bool #

Skip next is used to skip rendering of the next node.


[View source]
def soft_break(node, entering) #

[View source]
def strong(node, entering) #

[View source]
def text(node, entering) #

[View source]
def thematic_break(node, entering) #

[View source]