File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ impl CodeBlockAttribute {
432432
433433/// Block that is formatted as an item.
434434///
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 '+' .
436436/// Different level of indentation are handled by shrinking the shape accordingly.
437437struct ItemizedBlock {
438438 /// the lines that are identified as part of an itemized block
@@ -449,7 +449,8 @@ impl ItemizedBlock {
449449 /// Returns `true` if the line is formatted as an item
450450 fn is_itemized_line ( line : & str ) -> bool {
451451 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) )
453454 }
454455
455456 /// 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