File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,20 +145,17 @@ function moduleReport (report) {
145145 L ( chalk `{${ COLORS . light1 } ┌───┬─${ '─' . repeat ( maxLength ) } ─┐}` )
146146 }
147147
148- if ( title . length > maxLength ) {
149- const words = title . split ( ' ' )
150- const lines = [ '' , '' ]
151- for ( const word of words ) {
152- if ( ( lines [ 0 ] + word ) . length > maxLength - 10 ) lines [ 1 ] += ` ${ word } `
153- else lines [ 0 ] += `${ word } `
154- }
155- L ( chalk `{${ COLORS . light1 } │} {${ COLORS . yellow } !} {${ COLORS . light1 } │}` +
156- chalk `{white ${ lines [ 0 ] } } ${ ' ' . repeat ( maxLength - lines [ 0 ] . length ) } {${ COLORS . light1 } │}` )
157- L ( chalk `{${ COLORS . light1 } │} {${ COLORS . red } } {${ COLORS . light1 } │}` +
158- chalk `{white ${ lines [ 1 ] } } ${ ' ' . repeat ( maxLength - lines [ 1 ] . length ) } {${ COLORS . light1 } │}` )
159- } else {
148+ const lines = lineWrap ( title , maxLength )
149+
150+ {
151+ const line = lines . shift ( )
160152 L ( chalk `{${ COLORS . light1 } │} {${ COLORS . yellow } !} {${ COLORS . light1 } │}` +
161- chalk `{white ${ title } } ${ ' ' . repeat ( maxLength - title . length ) } {${ COLORS . light1 } │}` )
153+ chalk `{white ${ line } } ${ ' ' . repeat ( maxLength - line . length ) } {${ COLORS . light1 } │}` )
154+ }
155+
156+ for ( const line of lines ) {
157+ L ( chalk `{${ COLORS . light1 } │} {${ COLORS . light1 } │}` +
158+ chalk `{white ${ line } } ${ ' ' . repeat ( maxLength - line . length ) } {${ COLORS . light1 } │}` )
162159 }
163160
164161 if ( ind === codeQuality . length - 1 ) {
You can’t perform that action at this time.
0 commit comments