From ae841fa0108761b615065bd36a40da88878999d5 Mon Sep 17 00:00:00 2001 From: Casey Brooks Date: Sat, 29 Sep 2018 21:08:04 -0500 Subject: [PATCH] Fixes issue rendering type parameters --- .../dokka/json/generator/formatter/formatParameters.kt | 2 +- .../copperleaf/dokka/json/test/kotlin/KotlinClass.kt | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dokka-json/src/main/kotlin/com/copperleaf/dokka/json/generator/formatter/formatParameters.kt b/dokka-json/src/main/kotlin/com/copperleaf/dokka/json/generator/formatter/formatParameters.kt index 55d6d36..b103c32 100644 --- a/dokka-json/src/main/kotlin/com/copperleaf/dokka/json/generator/formatter/formatParameters.kt +++ b/dokka-json/src/main/kotlin/com/copperleaf/dokka/json/generator/formatter/formatParameters.kt @@ -70,7 +70,7 @@ fun MutableList.appendNonFunctionalType(node: DocumentationN add(SignatureComponent("punctuation", "<", "")) typeArguments.forEachIndexed { index, parameter -> appendParameterType(parameter) - if (index < typeArguments.size - 2) { + if (index < typeArguments.size - 1) { add(SignatureComponent("punctuation", ", ", "")) } } diff --git a/dokka-json/src/test/kotlin/com/copperleaf/dokka/json/test/kotlin/KotlinClass.kt b/dokka-json/src/test/kotlin/com/copperleaf/dokka/json/test/kotlin/KotlinClass.kt index 4920ce5..5abc181 100644 --- a/dokka-json/src/test/kotlin/com/copperleaf/dokka/json/test/kotlin/KotlinClass.kt +++ b/dokka-json/src/test/kotlin/com/copperleaf/dokka/json/test/kotlin/KotlinClass.kt @@ -127,4 +127,14 @@ class KotlinClass( return null } + /** + * This is a method defined in the class body, which has parameters and a return value with internal types + * + * @param param This is the param1 for the method + * @return This is the returned string value + */ + fun multipleTypeParameters(param: Map) { + + } + } \ No newline at end of file