use once_cell::sync::Lazy;
use std::borrow::Cow;
use std::collections::VecDeque;
-use std::default::Default;
use std::fmt::Write;
use std::ops::{ControlFlow, Range};
use std::str;
}
fn is_forbidden_tag(t: &Tag<'_>) -> bool {
- matches!(t, Tag::CodeBlock(_) | Tag::Table(_) | Tag::TableHead | Tag::TableRow | Tag::TableCell)
+ matches!(
+ t,
+ Tag::CodeBlock(_)
+ | Tag::Table(_)
+ | Tag::TableHead
+ | Tag::TableRow
+ | Tag::TableCell
+ | Tag::FootnoteDefinition(_)
+ )
}
impl<'a, I: Iterator<Item = Event<'a>>> Iterator for SummaryLine<'a, I> {
is_start = false;
check_if_allowed_tag(c)
}
+ Event::FootnoteReference(_) => {
+ self.skipped_tags += 1;
+ false
+ }
_ => true,
};
if !is_allowed_tag {