From f9172b3a632181ee9b7ab5d674e537f4a71874eb Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 2 Mar 2015 12:02:32 +0100 Subject: remove extra space after type parameter list in Kotlin signature --- src/Kotlin/KotlinLanguageService.kt | 5 ++++- test/data/format/htmlEscaping.html | 2 +- test/data/format/javaCodeInParam.md | 2 +- test/data/format/parameterAnchor.html | 2 +- test/data/format/typeParameterVariance.md | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index 439ef174..4b43fb88 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -173,7 +173,7 @@ class KotlinLanguageService : LanguageService { renderList(typeParameters) { renderTypeParameter(it) } - symbol("> ") + symbol(">") } } @@ -248,6 +248,9 @@ class KotlinLanguageService : LanguageService { else -> throw IllegalArgumentException("Node $node is not a function-like object") } renderTypeParametersForNode(node) + if (node.details(DocumentationNode.Kind.TypeParameter).any()) { + text(" ") + } val receiver = node.details(DocumentationNode.Kind.Receiver).singleOrNull() if (receiver != null) { renderType(receiver.detail(DocumentationNode.Kind.Type)) diff --git a/test/data/format/htmlEscaping.html b/test/data/format/htmlEscaping.html index 29c4bf0e..52c69239 100644 --- a/test/data/format/htmlEscaping.html +++ b/test/data/format/htmlEscaping.html @@ -6,7 +6,7 @@ test / x

x

-fun <T> x(): T?
+fun <T> x(): T?

Special characters: < is "less than", > is "greater than", & is "ampersand"



diff --git a/test/data/format/javaCodeInParam.md b/test/data/format/javaCodeInParam.md index ef54eb6b..88cb6912 100644 --- a/test/data/format/javaCodeInParam.md +++ b/test/data/format/javaCodeInParam.md @@ -3,7 +3,7 @@ # C -`open class C<T> ` +`open class C<T>` diff --git a/test/data/format/parameterAnchor.html b/test/data/format/parameterAnchor.html index 445566e8..99f0f110 100644 --- a/test/data/format/parameterAnchor.html +++ b/test/data/format/parameterAnchor.html @@ -6,7 +6,7 @@ test / processFiles

processFiles

-public fun <T> processFiles(processor: () -> T): List<T>
+public fun <T> processFiles(processor: () -> T): List<T>

Runs processor for each file and collects its results into single list

Parameters

diff --git a/test/data/format/typeParameterVariance.md b/test/data/format/typeParameterVariance.md index 9ba871a8..c0bfa6de 100644 --- a/test/data/format/typeParameterVariance.md +++ b/test/data/format/typeParameterVariance.md @@ -3,7 +3,7 @@ # Foo -`class Foo<out T> ` +`class Foo<out T>` -- cgit