Function mdbook::utils::unique_id_from_content

source ·
pub fn unique_id_from_content(
    content: &str,
    id_counter: &mut HashMap<String, usize>
) -> String
Expand description

Generate an ID for use with anchors which is derived from a “normalised” string.

Each ID returned will be unique, if the same id_counter is provided on each call.