File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ impl CodeBlockAttribute {
432
432
433
433
/// Block that is formatted as an item.
434
434
///
435
- /// An item starts with either a star `*` a dash `-` or a greater-than `>`.
435
+ /// An item starts with either a star `*` a dash `-` a greater-than `>` or a plus '+' .
436
436
/// Different level of indentation are handled by shrinking the shape accordingly.
437
437
struct ItemizedBlock {
438
438
/// the lines that are identified as part of an itemized block
@@ -449,7 +449,8 @@ impl ItemizedBlock {
449
449
/// Returns `true` if the line is formatted as an item
450
450
fn is_itemized_line ( line : & str ) -> bool {
451
451
let trimmed = line. trim_start ( ) ;
452
- trimmed. starts_with ( "* " ) || trimmed. starts_with ( "- " ) || trimmed. starts_with ( "> " )
452
+ let itemized_start = [ "* " , "- " , "> " , "+ " ] ;
453
+ itemized_start. iter ( ) . any ( |s| trimmed. starts_with ( s) )
453
454
}
454
455
455
456
/// Creates a new ItemizedBlock described with the given line.
Original file line number Diff line number Diff line change
1
+ // rustfmt-wrap_comments: true
2
+ //! List:
3
+ //! - Sub list:
4
+ //! + very long #1 blah blah blah blah blah blah blah blah blah blah blah blah foo baar baxxxxxxxx long line 1231421230912i3091238192038
5
+ //! + very long #2 blah blah blah blah blah blah blah blah blah blah blah blah
Original file line number Diff line number Diff line change
1
+ // rustfmt-wrap_comments: true
2
+ //! List:
3
+ //! - Sub list:
4
+ //! + very long #1 blah blah blah blah blah blah blah blah blah blah blah blah
5
+ //! foo baar baxxxxxxxx long line 1231421230912i3091238192038
6
+ //! + very long #2 blah blah blah blah blah blah blah blah blah blah blah blah
You can’t perform that action at this time.
0 commit comments