Skip to main content

relative_from

Function relative_from 

Source
pub fn relative_from(source_file: &str, target: &str) -> String
Expand description

Rewrite a root-relative target as a link relative to source_file — the inverse of resolve_link, for suggesting the path an author meant to write. resolve_link(source, relative_from(source, target)) == target.