fix(mdhtml): dont add stuff on closing tags
This commit is contained in:
parent
b097e4a725
commit
b4bd7c845f
1 changed files with 23 additions and 22 deletions
|
@ -29,6 +29,9 @@ impl TokenSink for Sink {
|
|||
|
||||
self.0.push_str(tag.name.as_ref());
|
||||
|
||||
if tag.self_closing {
|
||||
self.0.push('/');
|
||||
} else {
|
||||
match tag.name.as_ref() {
|
||||
"img" => for attr in tag.attrs {
|
||||
match attr.name.local.as_ref() {
|
||||
|
@ -50,10 +53,8 @@ impl TokenSink for Sink {
|
|||
},
|
||||
_ => {},
|
||||
}
|
||||
|
||||
if tag.self_closing {
|
||||
self.0.push('/');
|
||||
}
|
||||
|
||||
self.0.push('>');
|
||||
},
|
||||
Token::CharacterTokens(txt) => self.0.push_str(txt.as_ref()),
|
||||
|
|
Loading…
Reference in a new issue