pub fn render_str(
source: &str,
file: &Path,
opts: RenderOptions<'_>,
) -> Result<MarkdownRenderResult, MarkdownError>Expand description
Renders markdown text to HTML, synchronously and without network access.
The one full-render pipeline: render_sync is this plus a file read, and
render_with_cache shares every pass and differs only in fetching
OpenGraph metadata over the network.
No-network embeds (YouTube, Giphy, GitHub gist, and bare-URL media) ARE
produced — they are pure CPU (regex/string) and require no I/O, so they
work regardless of oembed_timeout_ms. OpenGraph results are never fetched
here; when oembed_timeout_ms > 0 and a cache is present, previously cached
network results are merged in.
file only names the source in diagnostics (e.g. a YAML frontmatter parse
warning); it is never read.