class Mint::Compiler2::VDOMRenderer2

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 a tree of nodes and then using the JavaScript builder to render them.

Defined in:

utils/markd_vdom_renderer2.cr

Constant Summary

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

Class Method Summary

Instance Method Summary

Class Method Detail

def self.render(replacements : Array(Compiled), node : Node | String, separator : String, js : Js) : Compiled #

[View source]
def self.render(*, replacements : Array(Compiled), highlight : Bool | Nil = nil, document : Markd::Node, separator : String, js : Js) : Compiled #

[View source]

Instance Method Detail

def render(document : Markd::Node, separator : String, highlight : Bool | Nil) #

[View source]
def stack : Array(Node) #

[View source]