mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
rustdoc: avoid including <li>
tags in item table short desc
Fixes a bug seen at https://docs.rs/gl_constants/0.1.1/gl_constants/index.html
This commit is contained in:
parent
07c993eba8
commit
5a9a3df312
@ -552,10 +552,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> SummaryLine<'a, I> {
|
||||
}
|
||||
|
||||
fn check_if_allowed_tag(t: &Tag<'_>) -> bool {
|
||||
matches!(
|
||||
t,
|
||||
Tag::Paragraph | Tag::Item | Tag::Emphasis | Tag::Strong | Tag::Link(..) | Tag::BlockQuote
|
||||
)
|
||||
matches!(t, Tag::Paragraph | Tag::Emphasis | Tag::Strong | Tag::Link(..) | Tag::BlockQuote)
|
||||
}
|
||||
|
||||
fn is_forbidden_tag(t: &Tag<'_>) -> bool {
|
||||
|
1
tests/rustdoc/item-desc-list-at-start.item-table.html
Normal file
1
tests/rustdoc/item-desc-list-at-start.item-table.html
Normal file
@ -0,0 +1 @@
|
||||
<ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.MY_CONSTANT.html" title="constant item_desc_list_at_start::MY_CONSTANT">MY_CONSTANT</a></div><div class="desc docblock-short">Groups: <code>SamplePatternSGIS</code>, <code>SamplePatternEXT</code></div></li></ul>
|
9
tests/rustdoc/item-desc-list-at-start.rs
Normal file
9
tests/rustdoc/item-desc-list-at-start.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// @has item_desc_list_at_start/index.html
|
||||
// @count - '//ul[@class="item-table"]/li/div/li' 0
|
||||
// @count - '//ul[@class="item-table"]/li' 1
|
||||
// @snapshot item-table - '//ul[@class="item-table"]'
|
||||
|
||||
// based on https://docs.rs/gl_constants/0.1.1/src/gl_constants/lib.rs.html#16
|
||||
|
||||
/// * Groups: `SamplePatternSGIS`, `SamplePatternEXT`
|
||||
pub const MY_CONSTANT: usize = 0;
|
Loading…
Reference in New Issue
Block a user