MarkdownDocument represents a complete Markdown document stored as a single
character string. The constructor normalizes text by collapsing lines and
ensuring UTF-8 encoding, so downstream code can rely on a consistent format.
read_as_markdown() is the recommended way to create a MarkdownDocument.
The constructor itself is exported only so advanced users can construct one by
other means when needed.
Usage
MarkdownDocument(text, origin = attr(text, "origin", TRUE))