diff --git a/clippy_lints/src/doc/mod.rs b/clippy_lints/src/doc/mod.rs index 5b6a5b08aa9..7adffb09eb5 100644 --- a/clippy_lints/src/doc/mod.rs +++ b/clippy_lints/src/doc/mod.rs @@ -768,7 +768,7 @@ fn check_doc<'a, Events: Iterator, Range { + Text(text) => { paragraph_range.end = range.end; let range_ = range.clone(); ticks_unbalanced |= text.contains('`') @@ -812,7 +812,8 @@ fn check_doc<'a, Events: Iterator, Range {} } } headers diff --git a/tests/ui/doc/footnote_issue_13183.rs b/tests/ui/doc/footnote_issue_13183.rs new file mode 100644 index 00000000000..a18b4c3ac53 --- /dev/null +++ b/tests/ui/doc/footnote_issue_13183.rs @@ -0,0 +1,10 @@ +// This is a regression test for . +// It should not warn on missing backticks on footnote references. + +#![warn(clippy::doc_markdown)] +// Should not warn! +//! Here's a footnote[^example_footnote_identifier] +//! +//! [^example_footnote_identifier]: This is merely an example. + +fn main() {}