use @ instead of space for link ambiguity markers
since spaces aren't allowed in link targets in commonmark, a new symbol is needed to separate the marker from the rest of the path. hence, @
This commit is contained in:
parent
a3d71d7405
commit
4a20fb44c8
1 changed files with 6 additions and 6 deletions
|
|
@ -848,21 +848,21 @@ impl Clean<Attributes> for [ast::Attribute] {
|
|||
"trait", "union"].iter()
|
||||
.find(|p| link.starts_with(**p)) {
|
||||
kind = PathKind::Type;
|
||||
link.trim_left_matches(prefix).trim()
|
||||
link.trim_left_matches(prefix).trim_left_matches('@')
|
||||
} else if let Some(prefix) =
|
||||
["const", "static"].iter()
|
||||
.find(|p| link.starts_with(**p)) {
|
||||
kind = PathKind::Value;
|
||||
link.trim_left_matches(prefix).trim()
|
||||
link.trim_left_matches(prefix).trim_left_matches('@')
|
||||
} else if link.ends_with("()") {
|
||||
kind = PathKind::Value;
|
||||
link.trim_right_matches("()").trim()
|
||||
link.trim_right_matches("()")
|
||||
} else if link.ends_with('!') {
|
||||
kind = PathKind::Macro;
|
||||
link.trim_right_matches('!').trim()
|
||||
link.trim_right_matches('!')
|
||||
} else {
|
||||
link.trim()
|
||||
};
|
||||
&link[..]
|
||||
}.trim();
|
||||
|
||||
// avoid resolving things (i.e. regular links) which aren't like paths
|
||||
// FIXME(Manishearth) given that most links have slashes in them might be worth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue