Skip to content

Commit 1ff326d

Browse files
authored
Rollup merge of #120443 - GuillaumeGomez:footnote-def-improvement, r=fmease
Fixes footnote handling in rustdoc Fixes #100638. You can now declare footnotes like this: ```rust //! Reference to footnotes A[^1], B[^2] and C[^3]. //! //! [^1]: Footnote A. //! [^2]: Footnote B. //! [^3]: Footnote C. ``` r? `@notriddle`
2 parents bc66f44 + dad6802 commit 1ff326d

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

Cargo.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -3004,11 +3004,11 @@ dependencies = [
30043004

30053005
[[package]]
30063006
name = "pulldown-cmark"
3007-
version = "0.9.3"
3007+
version = "0.9.5"
30083008
source = "registry+https://github.com/rust-lang/crates.io-index"
3009-
checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998"
3009+
checksum = "80eb9f69aec5cd8828765a75f739383fbbe3e8b9d84370bde1cc90487700794a"
30103010
dependencies = [
3011-
"bitflags 1.3.2",
3011+
"bitflags 2.4.1",
30123012
"memchr",
30133013
"unicase",
30143014
]

compiler/rustc_resolve/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66
[dependencies]
77
# tidy-alphabetical-start
88
bitflags = "2.4.1"
9-
pulldown-cmark = { version = "0.9.3", default-features = false }
9+
pulldown-cmark = { version = "0.9.5", default-features = false }
1010
rustc_arena = { path = "../rustc_arena" }
1111
rustc_ast = { path = "../rustc_ast" }
1212
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#![crate_name = "foo"]
2+
3+
//! Reference to footnotes A[^1], B[^2] and C[^3].
4+
//!
5+
//! [^1]: Footnote A.
6+
//! [^2]: Footnote B.
7+
//! [^3]: Footnote C.
8+
9+
// @has 'foo/index.html'
10+
// @has - '//*[@class="docblock"]/*[@class="footnotes"]/ol/li[@id="fn1"]/p' 'Footnote A'
11+
// @has - '//li[@id="fn1"]/p/a/@href' '#fnref1'
12+
// @has - '//*[@class="docblock"]/*[@class="footnotes"]/ol/li[@id="fn2"]/p' 'Footnote B'
13+
// @has - '//li[@id="fn2"]/p/a/@href' '#fnref2'
14+
// @has - '//*[@class="docblock"]/*[@class="footnotes"]/ol/li[@id="fn3"]/p' 'Footnote C'
15+
// @has - '//li[@id="fn3"]/p/a/@href' '#fnref3'

0 commit comments

Comments
 (0)