Correctly handle if a link starts with a whitespace
This commit is contained in:
parent
9a7cc6c32f
commit
fd62036caa
2 changed files with 4 additions and 2 deletions
|
@ -340,6 +340,7 @@ pub fn inner_docs(attrs: &[ast::Attribute]) -> bool {
|
|||
fn preprocess_link(link: &str) -> String {
|
||||
let link = link.replace('`', "");
|
||||
let link = link.split('#').next().unwrap();
|
||||
let link = link.trim();
|
||||
let link = link.rsplit('@').next().unwrap();
|
||||
let link = link.strip_suffix("()").unwrap_or(link);
|
||||
let link = link.strip_suffix("{}").unwrap_or(link);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue