readme_rustdocifier

Function rustdocify

Source
pub fn rustdocify(
    readme: &str,
    package_name: &str,
    version: Option<&str>,
    crate_name: Option<&str>,
) -> Result<String, Error>
Expand description

Rustdocifies the given readme.

  • Removes top-level header.
  • Changes other headers to be one level higher.
  • Converts docs.rs links of given package_name to rustdoc format.
  • Doesn’t change anything within code blocks.
  • If version is given, checks that links have this exact version.
  • If crate_name is given, checks that links have this exact crate name, if any.

See crate index for an example and more details.