fix(mdhtml): don't add rel and target in mentions
This commit is contained in:
parent
9f81116ba3
commit
b53bd5527f
1 changed files with 5 additions and 2 deletions
|
@ -51,12 +51,15 @@ impl TokenSink for Sink {
|
|||
}
|
||||
},
|
||||
"a" => {
|
||||
let any_attr = !tag.attrs.is_empty();
|
||||
let mut any_attr = !tag.attrs.is_empty();
|
||||
for attr in tag.attrs {
|
||||
match attr.name.local.as_ref() {
|
||||
"href" => self.buffer.push_str(&format!(" href=\"{}\"", attr.value.as_ref())),
|
||||
"title" => self.buffer.push_str(&format!(" title=\"{}\"", attr.value.as_ref())),
|
||||
"class" => if attr.value.as_ref() == "u-url mention" { self.buffer.push_str(" class=\"u-url mention\"") },
|
||||
"class" => if attr.value.as_ref() == "u-url mention" {
|
||||
any_attr = false;
|
||||
self.buffer.push_str(" class=\"u-url mention\"")
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue