Skip to content

Commit 5a752cd

Browse files
Add test for footnote references in doc summary
1 parent d2d15fe commit 5a752cd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/rustdoc/footnote-in-summary.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This test ensures that no footnote reference is generated inside
2+
// summary doc.
3+
4+
#![crate_name = "foo"]
5+
6+
// @has 'foo/index.html'
7+
// @has - '//*[@class="desc docblock-short"]' 'hello bla'
8+
// @!has - '//*[@class="desc docblock-short"]/sup' '1'
9+
10+
// @has 'foo/struct.S.html'
11+
// @has - '//*[@class="docblock"]//sup' '1'
12+
// @has - '//*[@class="docblock"]' 'hello 1 bla'
13+
14+
/// hello [^foot] bla
15+
///
16+
/// [^foot]: blabla
17+
pub struct S;

0 commit comments

Comments
 (0)