MarkdownContentBuilder
A dedicated builder for creating markdown content. Wraps TextContentBuilder and provides markdown-specific functionality for generating well-formatted Markdown documents programmatically.
Example usage:
val document = markdown {
h1("Hello, Markdown!")
+"This is a paragraph of text."
h2("Features")
bulleted {
item("Easy to use")
item("Type-safe")
item("Extensible")
}
link("Learn more", "https://example.com")
}
Types
Context for building a single line of markdown with mixed formatting elements. Used within the line method to create complex inline formatting.
Context for building structured lists (bulleted, numbered).
Functions
Adds a blockquote to the content.
Adds a bulleted list with a block structure.
Adds a horizontal rule (---) to the content.
Creates a single line of markdown content with mixed formatting. Useful for creating complex inline formatting combinations.
Extension function to add markdown content to a TextContentBuilder.
Adds a numbered list with a block structure.
Adds a strikethrough text (text) to the content.