This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ impl CodeBlockAttribute {
398
398
/// Block that is formatted as an item.
399
399
///
400
400
/// An item starts with either a star `*` or a dash `-`. Different level of indentation are
401
- /// handled.
401
+ /// handled by shrinking the shape accordingly .
402
402
struct ItemizedBlock {
403
403
/// the number of whitespaces up to the item sigil
404
404
indent : usize ,
@@ -585,7 +585,7 @@ impl<'a> CommentRewrite<'a> {
585
585
586
586
if let Some ( ref ib) = self . item_block {
587
587
if ib. in_block ( & line) {
588
- self . item_block_buffer . push_str ( & line) ;
588
+ self . item_block_buffer . push_str ( line. trim_start ( ) ) ;
589
589
self . item_block_buffer . push ( '\n' ) ;
590
590
return false ;
591
591
}
Original file line number Diff line number Diff line change
1
+ // rustfmt-wrap_comments: true
2
+
3
+ /// This may panic if:
4
+ /// - there are fewer than `max_header_bytes` bytes preceding the body
5
+ /// - there are fewer than `max_footer_bytes` bytes following the body
6
+ /// - the sum of the body bytes and post-body bytes is less than the sum
7
+ /// of `min_body_and_padding_bytes` and `max_footer_bytes` (in other
8
+ /// words, the minimum body and padding byte requirement is not met)
9
+ fn foo ( ) { }
Original file line number Diff line number Diff line change
1
+ // rustfmt-wrap_comments: true
2
+
3
+ /// This may panic if:
4
+ /// - there are fewer than `max_header_bytes` bytes preceding the body
5
+ /// - there are fewer than `max_footer_bytes` bytes following the body
6
+ /// - the sum of the body bytes and post-body bytes is less than the sum of
7
+ /// `min_body_and_padding_bytes` and `max_footer_bytes` (in other words, the
8
+ /// minimum body and padding byte requirement is not met)
9
+ fn foo ( ) { }
You can’t perform that action at this time.
0 commit comments