diff options
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 5 | ||||
-rw-r--r-- | test/data/format/htmlEscaping.html | 2 | ||||
-rw-r--r-- | test/data/format/javaCodeInParam.md | 2 | ||||
-rw-r--r-- | test/data/format/parameterAnchor.html | 2 | ||||
-rw-r--r-- | 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 @@ <a href="test/index">test</a> / <a href="test/x">x</a><br/> <br/> <h1>x</h1> -<code><span class="keyword">fun </span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">> </span><span class="identifier">x</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">T?</span></code><br/> +<code><span class="keyword">fun </span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">></span> <span class="identifier">x</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">T?</span></code><br/> <p>Special characters: < is "less than", > is "greater than", & is "ampersand"</p> <br/> <br/> 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 @@ <a href="test/index">test</a> / <a href="test/process-files">processFiles</a><br/> <br/> <h1>processFiles</h1> -<code><span class="keyword">public</span> <span class="keyword">fun </span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">> </span><span class="identifier">processFiles</span><span class="symbol">(</span><span class="identifier">processor</span><span class="symbol">:</span> <span class="symbol">(</span><span class="symbol">)</span> <span class="symbol">-></span> <span class="identifier">T</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">></span></code><br/> +<code><span class="keyword">public</span> <span class="keyword">fun </span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">></span> <span class="identifier">processFiles</span><span class="symbol">(</span><span class="identifier">processor</span><span class="symbol">:</span> <span class="symbol">(</span><span class="symbol">)</span> <span class="symbol">-></span> <span class="identifier">T</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">></span></code><br/> <p>Runs <a href="test/process-files#processor">processor</a> for each file and collects its results into single list</p> <h3>Parameters</h3> <a name="processor"></a> 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>` |