Commit 6f7aeed 1 parent e6bc629 commit 6f7aeed Copy full SHA for 6f7aeed
File tree 3 files changed +18
-0
lines changed
3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -885,6 +885,9 @@ impl<'a> CommentRewrite<'a> {
885
885
// Remove space if this is an empty comment or a doc comment.
886
886
self . result . pop ( ) ;
887
887
}
888
+ if self . code_block_attr . is_some ( ) && self . is_prev_line_multi_line {
889
+ self . result . push_str ( & self . comment_line_separator ) ;
890
+ }
888
891
self . result . push_str ( line) ;
889
892
self . fmt . shape = Shape :: legacy ( self . max_width , self . fmt_indent ) ;
890
893
self . is_prev_line_multi_line = false ;
Original file line number Diff line number Diff line change
1
+ // rustfmt-wrap_comments: false
2
+
3
+ /// Here is me writing some documentation that is too long oh me oh my now some code please!
4
+ /// ```
5
+ /// test
6
+ /// ```
7
+ fn foo ( ) { }
Original file line number Diff line number Diff line change
1
+ // rustfmt-wrap_comments: true
2
+
3
+ /// Here is me writing some documentation that is too long oh me oh my now some
4
+ /// code please!
5
+ /// ```
6
+ /// test
7
+ /// ```
8
+ fn foo ( ) { }
You can’t perform that action at this time.
0 commit comments