mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Remove footnote references from doc summary
This commit is contained in:
parent
2d64f229a0
commit
d2d15fe60e
@ -556,7 +556,15 @@ fn check_if_allowed_tag(t: &Tag<'_>) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn is_forbidden_tag(t: &Tag<'_>) -> bool {
|
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> {
|
impl<'a, I: Iterator<Item = Event<'a>>> Iterator for SummaryLine<'a, I> {
|
||||||
@ -589,6 +597,10 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for SummaryLine<'a, I> {
|
|||||||
is_start = false;
|
is_start = false;
|
||||||
check_if_allowed_tag(c)
|
check_if_allowed_tag(c)
|
||||||
}
|
}
|
||||||
|
Event::FootnoteReference(_) => {
|
||||||
|
self.skipped_tags += 1;
|
||||||
|
false
|
||||||
|
}
|
||||||
_ => true,
|
_ => true,
|
||||||
};
|
};
|
||||||
if !is_allowed_tag {
|
if !is_allowed_tag {
|
||||||
|
Loading…
Reference in New Issue
Block a user