File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
plugins/package-managers/node/src/main/kotlin/npm Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -307,11 +307,11 @@ internal fun List<String>.groupLines(vararg markers: String): List<String> {
307307 }
308308
309309 // If no lines but the last end with a dot, assume the message to be a single sentence.
310- return if (
311- nonFooterLines.size > 1 &&
312- nonFooterLines.last(). endsWith(' .' ) &&
313- nonFooterLines.subList( 0 , nonFooterLines.size - 1 ).none { it.endsWith( ' . ' ) }
314- ) {
310+ val isMultiLineSentence = nonFooterLines.size > 1
311+ && nonFooterLines.last().endsWith( ' . ' )
312+ && nonFooterLines.subList( 0 , nonFooterLines.size - 1 ).none { it. endsWith(' .' ) }
313+
314+ return if (isMultiLineSentence ) {
315315 listOf (nonFooterLines.joinToString(" " ))
316316 } else {
317317 nonFooterLines.map { it.trim() }
You can’t perform that action at this time.
0 commit comments