Function rustdoc::html::markdown::markdown_summary_with_limit

source ·
fn markdown_summary_with_limit(
    md: &str,
    link_names: &[RenderedLink],
    length_limit: usize
) -> (String, bool)
Expand description

Renders a subset of Markdown in the first paragraph of the provided Markdown.

  • Italics, bold, and inline code styles are rendered.
  • Headings and links are stripped (though the text is rendered).
  • HTML, code blocks, and everything else are ignored.

Returns a tuple of the rendered HTML string and whether the output was shortened due to the provided length_limit.