mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
fix doc_markdown false positive
This commit is contained in:
parent
8d427b624f
commit
e9a5694597
@ -549,7 +549,7 @@ fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize
|
||||
FootnoteReference(text) | Text(text) => {
|
||||
let (begin, span) = get_current_span(spans, range.start);
|
||||
paragraph_span = paragraph_span.with_hi(span.hi());
|
||||
ticks_unbalanced |= text.contains('`');
|
||||
ticks_unbalanced |= text.contains('`') && !in_code;
|
||||
if Some(&text) == in_link.as_ref() || ticks_unbalanced {
|
||||
// Probably a link of the form `<http://example.com>`
|
||||
// Which are represented as a link to "http://example.com" with
|
||||
|
@ -34,3 +34,10 @@ fn in_code_block() {}
|
||||
/// - This `item has unbalanced tick marks
|
||||
/// - This item needs backticks_here
|
||||
fn other_markdown() {}
|
||||
|
||||
#[rustfmt::skip]
|
||||
/// - ```rust
|
||||
/// /// `lol`
|
||||
/// pub struct Struct;
|
||||
/// ```
|
||||
fn iss_7421() {}
|
||||
|
Loading…
Reference in New Issue
Block a user