File tree 3 files changed +4
-6
lines changed
clikt/src/main/kotlin/com/github/ajalt/clikt 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -308,12 +308,12 @@ abstract class CliktCommand(
308
308
309
309
/* * Add the given commands as a subcommand of this command. */
310
310
fun <T : CliktCommand > T.subcommands (commands : Iterable <CliktCommand >): T = apply {
311
- _subcommands + = commands
311
+ _subcommands = _subcommands + commands
312
312
}
313
313
314
314
/* * Add the given commands as a subcommand of this command. */
315
315
fun <T : CliktCommand > T.subcommands (vararg commands : CliktCommand ): T = apply {
316
- _subcommands + = commands
316
+ _subcommands = _subcommands + commands
317
317
}
318
318
319
319
/* *
Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ internal fun splitParagraphs(text: String): List<String> {
26
26
while (i < text.length) {
27
27
val end = if (text.startsWith(" ```" , startIndex = i)) {
28
28
PRE_P_END_REGEX .find(text, startIndex = i + 3 )?.let {
29
- (it.range.start + 3 ).. it.range.last
29
+ (it.range.first + 3 ).. it.range.last
30
30
}
31
31
} else {
32
32
PLAIN_P_END_REGEX .find(text, startIndex = i)?.let {
33
- if (it.value.endsWith(" ```" )) it.range.start .. (it.range.last - 3 )
33
+ if (it.value.endsWith(" ```" )) it.range.first .. (it.range.last - 3 )
34
34
else it.range
35
35
}
36
36
} ? : text.length.. text.length
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import com.github.ajalt.clikt.core.GroupableOption
6
6
import com.github.ajalt.clikt.core.ParameterHolder
7
7
import com.github.ajalt.clikt.output.HelpFormatter
8
8
import com.github.ajalt.clikt.parameters.options.Option
9
- import com.github.ajalt.clikt.parameters.options.OptionDelegate
10
- import com.github.ajalt.clikt.parameters.options.longestName
11
9
import com.github.ajalt.clikt.parsers.OptionParser
12
10
import kotlin.properties.ReadOnlyProperty
13
11
import kotlin.reflect.KProperty
You can’t perform that action at this time.
0 commit comments