pub fn normalize_target(raw: &str) -> StringExpand description
Normalise a link target to an index key.
This is the crate’s only place a .md extension is stripped, running
on both path suffixes at build time and queries at resolve time. Stripping
elsewhere strips a second .md extension, doubling it.
§Examples
use markdown_link::normalize_target;
assert_eq!(normalize_target("./Notes//A%20B.MD"), "notes/a b");
assert_eq!(normalize_target(" dir\\file "), "dir/file");