Skip to main content

inline_rustdoc_destination

Function inline_rustdoc_destination 

Source
fn inline_rustdoc_destination(s: &str, start: usize) -> Option<usize>
Expand description

The end (past its )) of the destination of an inline link [text](dest) starting at byte start (just past the (), when that destination was written for rustdoc: a Rust path (is_rust_path) containing ::, with an optional disambiguator prefix (strip_rustdoc_disambiguator), such as crate::x, serde::Serialize or fn@Self::new.

rustdoc reads [text](crate::x) as an intra-doc link; roxygen2 reads it as a web link and renders \href{crate::x}{text}, a dead link, without a warning (#1744). roxygen2 never reads the inline form as an R link, so the root of the path does not matter (dplyr::bind_rows is as dead as crate::x, #1756). None for an unclosed destination, one that spans whitespace, any URL (https://a.b/c::d, ./x.html), and a path without ::: Foo, which a relative URL may spell.