@@ -115,28 +115,31 @@ impl<'a> Format<'a> for FormatLeadingComments<'a> {
115115 write ! ( f, comment) ;
116116
117117 match comment. kind {
118- CommentKind :: Block => match f. source_text ( ) . lines_after ( comment. span . end ) {
119- 0 => {
120- let should_nestle =
121- leading_comments_iter. peek ( ) . is_some_and ( |next_comment| {
122- should_nestle_adjacent_doc_comments (
123- comment,
124- next_comment,
125- f. source_text ( ) ,
126- )
127- } ) ;
128-
129- write ! ( f, [ maybe_space( !should_nestle) ] ) ;
130- }
131- 1 => {
132- if f. source_text ( ) . get_lines_before ( comment. span , f. comments ( ) ) == 0 {
133- write ! ( f, [ soft_line_break_or_space( ) ] ) ;
134- } else {
135- write ! ( f, [ hard_line_break( ) ] ) ;
118+ CommentKind :: Block | CommentKind :: MultilineBlock => {
119+ match f. source_text ( ) . lines_after ( comment. span . end ) {
120+ 0 => {
121+ let should_nestle =
122+ leading_comments_iter. peek ( ) . is_some_and ( |next_comment| {
123+ should_nestle_adjacent_doc_comments (
124+ comment,
125+ next_comment,
126+ f. source_text ( ) ,
127+ )
128+ } ) ;
129+
130+ write ! ( f, [ maybe_space( !should_nestle) ] ) ;
131+ }
132+ 1 => {
133+ if f. source_text ( ) . get_lines_before ( comment. span , f. comments ( ) ) == 0
134+ {
135+ write ! ( f, [ soft_line_break_or_space( ) ] ) ;
136+ } else {
137+ write ! ( f, [ hard_line_break( ) ] ) ;
138+ }
136139 }
140+ _ => write ! ( f, [ empty_line( ) ] ) ,
137141 }
138- _ => write ! ( f, [ empty_line( ) ] ) ,
139- } ,
142+ }
140143 CommentKind :: Line => match f. source_text ( ) . lines_after ( comment. span . end ) {
141144 0 | 1 => write ! ( f, [ hard_line_break( ) ] ) ,
142145 _ => write ! ( f, [ empty_line( ) ] ) ,
0 commit comments