pub fn resolve(doc: &Path, target: &str) -> PathBufExpand description
Resolve a link target written in doc to a normalized path in the same
coordinate system as doc (workspace-relative when doc is). A target with
a leading / is workspace-absolute — resolved from the root, not doc’s
directory, and never against the filesystem root; any other target is
relative to doc’s directory.
Any sub-document locator is dropped first: it names a place inside the document, so it has no bearing on which file this is.