Skip to content

Commit

Permalink
Small, comment-only (and whitespace-only) tweaks after a self-review.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Anforowicz committed Feb 2, 2023
1 parent 01fc603 commit 16bbdeb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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),
Expand All @@ -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
Expand Down

0 comments on commit 16bbdeb

Please sign in to comment.