markdown

Extension function to append markdown content to a StringBuilder.

Example:

val sb = StringBuilder()
sb.markdown {
h1("Title")
+"Content"
}

Parameters

init

The markdown content builder


Extension function to add markdown content to a TextContentBuilder.

Useful for embedding markdown content within other text content.

Example:

TextContentBuilder().apply {
text("Some text before markdown.")
markdown {
h2("Markdown Section")
bulleted {
item("Item 1")
item("Item 2")
}
}
text("Some text after markdown.")
}

Parameters

init

The markdown content builder


Creates a markdown document with the given content.

Return

The markdown document as a string

Parameters

init

The content builder