rustdoc::html::markdown

Function short_markdown_summary

Source
pub(crate) fn short_markdown_summary(
    markdown: &str,
    link_names: &[RenderedLink],
) -> String
Expand description

Renders a shortened first paragraph of the given Markdown as a subset of Markdown, making it suitable for contexts like the search index.

Will shorten to 59 or 60 characters, including an ellipsis (…) if it was shortened.

See markdown_summary_with_limit for details about what is rendered and what is not.