diff --git a/src/construct/autolink.rs b/src/construct/autolink.rs index e8f30fb..cad6148 100644 --- a/src/construct/autolink.rs +++ b/src/construct/autolink.rs @@ -21,9 +21,9 @@ //! ``` //! //! The maximum allowed size of a scheme is `31` (inclusive), which is defined -//! in [`AUTOLINK_SCHEME_SIZE_MAX`][autolink_scheme_size_max]. +//! in [`AUTOLINK_SCHEME_SIZE_MAX`][]. //! The maximum allowed size of a domain is `63` (inclusive), which is defined -//! in [`AUTOLINK_DOMAIN_SIZE_MAX`][autolink_domain_size_max]. +//! in [`AUTOLINK_DOMAIN_SIZE_MAX`][]. //! //! The grammar for autolinks is quite strict and prohibits the use of ASCII control //! characters or spaces. diff --git a/src/construct/gfm_footnote_definition.rs b/src/construct/gfm_footnote_definition.rs index 99758f9..13e99ca 100644 --- a/src/construct/gfm_footnote_definition.rs +++ b/src/construct/gfm_footnote_definition.rs @@ -29,7 +29,7 @@ //! //! Definitions match to calls through identifiers. //! To match, both labels must be equal after normalizing with -//! [`normalize_identifier`][normalize_identifier]. +//! [`normalize_identifier`][]. //! One definition can match to multiple calls. //! Multiple definitions with the same, normalized, identifier are ignored: the //! first definition is preferred. diff --git a/src/construct/html_flow.rs b/src/construct/html_flow.rs index fe68550..b0be4d6 100644 --- a/src/construct/html_flow.rs +++ b/src/construct/html_flow.rs @@ -68,12 +68,12 @@ //! typically kick-in instead. //! //! The list of tag names allowed in the **raw** production are defined in -//! [`HTML_RAW_NAMES`][html_raw_names]. +//! [`HTML_RAW_NAMES`][]. //! This production exists because there are a few cases where markdown //! *inside* some elements, and hence interleaving, does not make sense. //! //! The list of tag names allowed in the **basic** production are defined in -//! [`HTML_BLOCK_NAMES`][html_block_names]. +//! [`HTML_BLOCK_NAMES`][]. //! This production exists because there are a few cases where we can decide //! early that something is going to be a flow (block) element instead of a //! phrasing (inline) element. diff --git a/src/construct/label_end.rs b/src/construct/label_end.rs index 8898b88..bb2e59c 100644 --- a/src/construct/label_end.rs +++ b/src/construct/label_end.rs @@ -29,7 +29,7 @@ //! interpreting the text provided between the first, implicit, label (`x`). //! To match, the effective label of the reference must be equal to the label //! of the definition after normalizing with -//! [`normalize_identifier`][normalize_identifier]. +//! [`normalize_identifier`][]. //! //! Importantly, while the label of a full reference *can* include [string][] //! content, and in case of collapsed and shortcut references even [text][] diff --git a/src/construct/mod.rs b/src/construct/mod.rs index c78a002..a9c70b3 100644 --- a/src/construct/mod.rs +++ b/src/construct/mod.rs @@ -34,7 +34,7 @@ //! //! The following constructs are found in markdown (`CommonMark`): //! -//! * [attention][attention] (strong, emphasis, extension: GFM strikethrough) +//! * [attention][] (strong, emphasis, extension: GFM strikethrough) //! * [autolink][] //! * [blank line][blank_line] //! * [block quote][block_quote] diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs index ffea0da..016185c 100644 --- a/src/construct/partial_label.rs +++ b/src/construct/partial_label.rs @@ -16,7 +16,7 @@ //! //! The maximum allowed size of the label, without the brackets, is `999` //! (inclusive), which is defined in -//! [`LINK_REFERENCE_SIZE_MAX`][link_reference_size_max]. +//! [`LINK_REFERENCE_SIZE_MAX`][]. //! //! Labels can contain line endings and whitespace, but they are not allowed to //! contain blank lines, and they must not be blank themselves. diff --git a/src/construct/partial_whitespace.rs b/src/construct/partial_whitespace.rs index 276c24e..06373c8 100644 --- a/src/construct/partial_whitespace.rs +++ b/src/construct/partial_whitespace.rs @@ -18,7 +18,7 @@ //! consistents solely of spaces, at least 2, forms a hard break (trailing). //! //! The minimum number of those spaces is defined in -//! [`HARD_BREAK_PREFIX_SIZE_MIN`][hard_break_prefix_size_min]. +//! [`HARD_BREAK_PREFIX_SIZE_MIN`][]. //! //! It is also possible to create a hard break with a similar construct: a //! [hard break (escape)][hard_break_escape] is a backslash followed diff --git a/src/util/sanitize_uri.rs b/src/util/sanitize_uri.rs index c7a646a..392f7b1 100644 --- a/src/util/sanitize_uri.rs +++ b/src/util/sanitize_uri.rs @@ -29,7 +29,7 @@ pub fn sanitize(value: &str) -> String { /// Make a value safe for injection as a URL, and check protocols. /// -/// This first uses [`sanitize`][sanitize]. +/// This first uses [`sanitize`][]. /// Then, a vec of (lowercase) allowed protocols can be given, in which case /// the URL is ignored or kept. /// @@ -127,6 +127,8 @@ fn normalize(value: &str) -> String { { result.push_str(&chars[start..index].iter().collect::()); char.encode_utf8(&mut buff); + + #[allow(clippy::format_collect)] result.push_str( &buff[0..char.len_utf8()] .iter()