Markdown

class Markdown

A DSL for customizing the rendering of Markdown with CommonMark.

Uses the commonmark-java library to parse and render Markdown.

See the CommonMark specification for details on the Markdown syntax, and the different node types.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
inline fun <T : Node> attributes(crossinline block: CustomAttributes.() -> Unit)

Add a custom attribute provider for the given node type.

fun <T : Node> attributes(vararg clazz: KClass<T>, block: CustomAttributes.() -> Unit)

Add a custom attribute provider for the given node type(s).

Link copied to clipboard
fun block(block: CustomRenderer<Block>.() -> Unit)

Add a custom renderer for Block nodes.

Link copied to clipboard
fun blockQuote(block: CustomRenderer<BlockQuote>.() -> Unit)

Add a custom renderer for BlockQuote node.

Link copied to clipboard
fun bulletList(block: CustomRenderer<BulletList>.() -> Unit)

Add a custom renderer for BulletList node.

Link copied to clipboard
fun code(block: CustomRenderer<Code>.() -> Unit)

Add a custom renderer for Code nodes.

Link copied to clipboard
fun config(block: Config.() -> Unit)

Configure the Markdown parser and renderer.

Link copied to clipboard
fun document(block: CustomRenderer<Document>.() -> Unit)

Add a custom renderer for Document node.

Link copied to clipboard
fun emphasis(block: CustomRenderer<Emphasis>.() -> Unit)

Add a custom renderer for Emphasis node.

Link copied to clipboard
fun fencedCodeBlock(block: CustomRenderer<FencedCodeBlock>.() -> Unit)

Add a custom renderer for FencedCodeBlock node.

Link copied to clipboard
fun footnoteDefinition(block: CustomRenderer<FootnoteDefinition>.() -> Unit)

Add a custom renderer for FootnoteDefinition node.

Link copied to clipboard
fun footnoteReference(block: CustomRenderer<FootnoteReference>.() -> Unit)

Add a custom renderer for FootnoteReference node.

Link copied to clipboard
fun hardLineBreak(block: CustomRenderer<HardLineBreak>.() -> Unit)

Add a custom renderer for HardLineBreak node.

Link copied to clipboard
fun heading(block: CustomRenderer<Heading>.() -> Unit)

Add a custom renderer for Heading node.

Link copied to clipboard
fun htmlBlock(block: CustomRenderer<HtmlBlock>.() -> Unit)

Add a custom renderer for HtmlBlock node.

Link copied to clipboard
fun htmlInline(block: CustomRenderer<HtmlInline>.() -> Unit)

Add a custom renderer for HtmlBlock node.

Link copied to clipboard
fun image(block: CustomRenderer<Image>.() -> Unit)

Add a custom renderer for HtmlInline node.

Link copied to clipboard
fun imageAttributes(block: CustomRenderer<ImageAttributes>.() -> Unit)

Add a custom renderer for ImageAttributes node.

Link copied to clipboard
fun indentedCodeBlock(block: CustomRenderer<IndentedCodeBlock>.() -> Unit)

Add a custom renderer for HtmlInline node.

Link copied to clipboard
fun ins(block: CustomRenderer<Ins>.() -> Unit)

Add a custom renderer for Ins node.

Link copied to clipboard
fun link(block: CustomRenderer<Link>.() -> Unit)

Add a custom renderer for Link node.

Link copied to clipboard
fun linkReferenceDefinition(block: CustomRenderer<LinkReferenceDefinition>.() -> Unit)

Add a custom renderer for LinkReferenceDefinition node.

Link copied to clipboard
fun listBlock(block: CustomRenderer<ListBlock>.() -> Unit)

Add a custom renderer for ListBlock node.

Link copied to clipboard
fun listItem(block: CustomRenderer<ListItem>.() -> Unit)

Add a custom renderer for ListItem node.

Link copied to clipboard
fun orderedList(block: CustomRenderer<OrderedList>.() -> Unit)

Add a custom renderer for OrderedList node.

Link copied to clipboard
fun paragraph(block: CustomRenderer<Paragraph>.() -> Unit)

Add a custom renderer for Paragraph node.

Link copied to clipboard
fun parser(block: Parser.Builder.() -> Unit)

Customize the Markdown parser.

Link copied to clipboard
fun <T : Node> render(vararg clazz: KClass<T>, block: CustomRenderer<Node>.() -> Unit)

Add a custom renderer for the given node type(s).

Link copied to clipboard
fun renderer(block: HtmlRenderer.Builder.() -> Unit)

Customize the Markdown renderer.

Link copied to clipboard
fun softLineBreak(block: CustomRenderer<SoftLineBreak>.() -> Unit)

Add a custom renderer for SoftLineBreak node.

Link copied to clipboard
fun strikethrough(block: CustomRenderer<Strikethrough>.() -> Unit)

Add a custom renderer for Strikethrough node.

Link copied to clipboard
fun strongEmphasis(block: CustomRenderer<StrongEmphasis>.() -> Unit)

Add a custom renderer for StrongEmphasis node.

Link copied to clipboard
fun tableBlock(block: CustomRenderer<TableBlock>.() -> Unit)

Add a custom renderer for TableBlock node.

Link copied to clipboard
fun tableBody(block: CustomRenderer<TableBody>.() -> Unit)

Add a custom renderer for TableBody node.

Link copied to clipboard
fun tableCell(block: CustomRenderer<TableCell>.() -> Unit)

Add a custom renderer for TableCell node.

Link copied to clipboard
fun tableHead(block: CustomRenderer<TableHead>.() -> Unit)

Add a custom renderer for TableHead node.

Link copied to clipboard
fun tableRow(block: CustomRenderer<TableRow>.() -> Unit)

Add a custom renderer for TableRow node.

Link copied to clipboard
fun taskListItemMarker(block: CustomRenderer<TaskListItemMarker>.() -> Unit)

Add a custom renderer for TaskListItemMarker node.

Link copied to clipboard
fun text(block: CustomRenderer<Text>.() -> Unit)

Add a custom renderer for Text node.

Link copied to clipboard
fun thematicBreak(block: CustomRenderer<ThematicBreak>.() -> Unit)

Add a custom renderer for ThematicBreak node.

Link copied to clipboard
fun visitor(visitor: Visitor)

Add a custom visitor.

Link copied to clipboard
fun yamlFrontMatterBlock(block: CustomRenderer<YamlFrontMatterBlock>.() -> Unit)

Add a custom renderer for YamlFrontMatterBlock node.

Link copied to clipboard
fun yamlFrontMatterNode(block: CustomRenderer<YamlFrontMatterNode>.() -> Unit)

Add a custom renderer for YamlFrontMatterNode node.