html: fix invalid html for footnote inside image
This commit is contained in:
parent
c6022004bb
commit
33d8215a2a
1 changed files with 7 additions and 5 deletions
|
@ -402,12 +402,14 @@ impl<'s, I: Iterator<Item = Event<'s>>, W: std::fmt::Write> Writer<'s, I, W> {
|
||||||
Raw::Other => {}
|
Raw::Other => {}
|
||||||
},
|
},
|
||||||
Event::FootnoteReference(_tag, number) => {
|
Event::FootnoteReference(_tag, number) => {
|
||||||
|
if self.img_alt_text == 0 {
|
||||||
write!(
|
write!(
|
||||||
self.out,
|
self.out,
|
||||||
r##"<a id="fnref{}" href="#fn{}" role="doc-noteref"><sup>{}</sup></a>"##,
|
r##"<a id="fnref{}" href="#fn{}" role="doc-noteref"><sup>{}</sup></a>"##,
|
||||||
number, number, number
|
number, number, number
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Event::Symbol(sym) => write!(self.out, ":{}:", sym)?,
|
Event::Symbol(sym) => write!(self.out, ":{}:", sym)?,
|
||||||
Event::LeftSingleQuote => self.out.write_str("‘")?,
|
Event::LeftSingleQuote => self.out.write_str("‘")?,
|
||||||
Event::RightSingleQuote => self.out.write_str("’")?,
|
Event::RightSingleQuote => self.out.write_str("’")?,
|
||||||
|
|
Loading…
Reference in a new issue