class Mint::VDOMRenderer
- Mint::VDOMRenderer
- Reference
- Object
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_renderer.crConstant Summary
-
HEADINGS =
["h1", "h2", "h3", "h4", "h5", "h6"] of ::String
Class Method Summary
- .render(replacements : Array(Compiler::Compiled), node : Node | String, separator : String, js : Compiler::Js) : Compiler::Compiled
- .render(*, highlight : Highlight = Highlight::None, replacements : Array(Compiler::Compiled), document : Markd::Node, separator : String, js : Compiler::Js) : Compiler::Compiled
- .render_html(*, highlight : Highlight = Highlight::None, replacements : Array(String), document : Markd::Node, separator : String)
Instance Method Summary
- #render(document : Markd::Node, separator : String, highlight : Highlight) : Node
- #replace(item : String, separator : String) : Array(Node | String)
- #replace(node : Node, separator : String) : Array(Node | String)
- #stack : Array(Node)
Class Method Detail
def self.render(replacements : Array(Compiler::Compiled), node : Node | String, separator : String, js : Compiler::Js) : Compiler::Compiled
#
def self.render(*, highlight : Highlight = Highlight::None, replacements : Array(Compiler::Compiled), document : Markd::Node, separator : String, js : Compiler::Js) : Compiler::Compiled
#
def self.render_html(*, highlight : Highlight = Highlight::None, replacements : Array(String), document : Markd::Node, separator : String)
#