From 16bbdeb55d1d5365a4e310da8ec5d9bbc300d969 Mon Sep 17 00:00:00 2001 From: Lukasz Anforowicz Date: Thu, 2 Feb 2023 20:25:43 +0000 Subject: [PATCH] Small, comment-only (and whitespace-only) tweaks after a self-review. --- src/comment.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/comment.rs b/src/comment.rs index 1127d21abd0..85918ecc116 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -436,7 +436,7 @@ impl CodeBlockAttribute { /// `12.` or `34)` (with at most 2 digits). An item represents CommonMark's ["list /// items"](https://spec.commonmark.org/0.30/#list-items) and/or ["block /// quotes"](https://spec.commonmark.org/0.30/#block-quotes), but note that only a subset of -/// CommonMark is recognized - see the doc comment of `ItemizedBlock::get_marker_length` for more +/// CommonMark is recognized - see the doc comment of [`ItemizedBlock::get_marker_length`] for more /// details. /// /// Different level of indentation are handled by shrinking the shape accordingly. @@ -453,9 +453,9 @@ struct ItemizedBlock { impl ItemizedBlock { /// Checks whether the `trimmed` line includes an item marker. Returns `None` if there is no - /// marker. Returns the length of the marker if one is present. Note that the length includes - /// the whitespace that follows the marker, for example the marker in `"* list item"` has the - /// length of 2. + /// marker. Returns the length of the marker (in bytes) if one is present. Note that the length + /// includes the whitespace that follows the marker, for example the marker in `"* list item"` + /// has the length of 2. /// /// This function recognizes item markers that correspond to CommonMark's /// ["bullet list marker"](https://spec.commonmark.org/0.30/#bullet-list-marker), @@ -477,7 +477,7 @@ impl ItemizedBlock { // https://spec.commonmark.org/0.30/#block-quote-marker let itemized_start = ["* ", "- ", "> ", "+ "]; if itemized_start.iter().any(|s| trimmed.starts_with(s)) { - return Some(2); // All items in `itemized_start` have length 2. + return Some(2); // All items in `itemized_start` have length 2. } // https://spec.commonmark.org/0.30/#ordered-list-marker, where at most 2 digits are