File tree Expand file tree Collapse file tree 8 files changed +12
-10
lines changed
Expand file tree Collapse file tree 8 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 2121//! ```
2222//!
2323//! The maximum allowed size of a scheme is `31` (inclusive), which is defined
24- //! in [`AUTOLINK_SCHEME_SIZE_MAX`][autolink_scheme_size_max ].
24+ //! in [`AUTOLINK_SCHEME_SIZE_MAX`][].
2525//! The maximum allowed size of a domain is `63` (inclusive), which is defined
26- //! in [`AUTOLINK_DOMAIN_SIZE_MAX`][autolink_domain_size_max ].
26+ //! in [`AUTOLINK_DOMAIN_SIZE_MAX`][].
2727//!
2828//! The grammar for autolinks is quite strict and prohibits the use of ASCII control
2929//! characters or spaces.
Original file line number Diff line number Diff line change 2929//!
3030//! Definitions match to calls through identifiers.
3131//! To match, both labels must be equal after normalizing with
32- //! [`normalize_identifier`][normalize_identifier ].
32+ //! [`normalize_identifier`][].
3333//! One definition can match to multiple calls.
3434//! Multiple definitions with the same, normalized, identifier are ignored: the
3535//! first definition is preferred.
Original file line number Diff line number Diff line change 6868//! typically kick-in instead.
6969//!
7070//! The list of tag names allowed in the **raw** production are defined in
71- //! [`HTML_RAW_NAMES`][html_raw_names ].
71+ //! [`HTML_RAW_NAMES`][].
7272//! This production exists because there are a few cases where markdown
7373//! *inside* some elements, and hence interleaving, does not make sense.
7474//!
7575//! The list of tag names allowed in the **basic** production are defined in
76- //! [`HTML_BLOCK_NAMES`][html_block_names ].
76+ //! [`HTML_BLOCK_NAMES`][].
7777//! This production exists because there are a few cases where we can decide
7878//! early that something is going to be a flow (block) element instead of a
7979//! phrasing (inline) element.
Original file line number Diff line number Diff line change 2929//! interpreting the text provided between the first, implicit, label (`x`).
3030//! To match, the effective label of the reference must be equal to the label
3131//! of the definition after normalizing with
32- //! [`normalize_identifier`][normalize_identifier ].
32+ //! [`normalize_identifier`][].
3333//!
3434//! Importantly, while the label of a full reference *can* include [string][]
3535//! content, and in case of collapsed and shortcut references even [text][]
Original file line number Diff line number Diff line change 3434//!
3535//! The following constructs are found in markdown (`CommonMark`):
3636//!
37- //! * [attention][attention ] (strong, emphasis, extension: GFM strikethrough)
37+ //! * [attention][] (strong, emphasis, extension: GFM strikethrough)
3838//! * [autolink][]
3939//! * [blank line][blank_line]
4040//! * [block quote][block_quote]
Original file line number Diff line number Diff line change 1616//!
1717//! The maximum allowed size of the label, without the brackets, is `999`
1818//! (inclusive), which is defined in
19- //! [`LINK_REFERENCE_SIZE_MAX`][link_reference_size_max ].
19+ //! [`LINK_REFERENCE_SIZE_MAX`][].
2020//!
2121//! Labels can contain line endings and whitespace, but they are not allowed to
2222//! contain blank lines, and they must not be blank themselves.
Original file line number Diff line number Diff line change 1818//! consistents solely of spaces, at least 2, forms a hard break (trailing).
1919//!
2020//! The minimum number of those spaces is defined in
21- //! [`HARD_BREAK_PREFIX_SIZE_MIN`][hard_break_prefix_size_min ].
21+ //! [`HARD_BREAK_PREFIX_SIZE_MIN`][].
2222//!
2323//! It is also possible to create a hard break with a similar construct: a
2424//! [hard break (escape)][hard_break_escape] is a backslash followed
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pub fn sanitize(value: &str) -> String {
2929
3030/// Make a value safe for injection as a URL, and check protocols.
3131///
32- /// This first uses [`sanitize`][sanitize ].
32+ /// This first uses [`sanitize`][].
3333/// Then, a vec of (lowercase) allowed protocols can be given, in which case
3434/// the URL is ignored or kept.
3535///
@@ -127,6 +127,8 @@ fn normalize(value: &str) -> String {
127127 {
128128 result. push_str ( & chars[ start..index] . iter ( ) . collect :: < String > ( ) ) ;
129129 char. encode_utf8 ( & mut buff) ;
130+
131+ #[ allow( clippy:: format_collect) ]
130132 result. push_str (
131133 & buff[ 0 ..char. len_utf8 ( ) ]
132134 . iter ( )
You can’t perform that action at this time.
0 commit comments