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