diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-28 14:07:01 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-29 11:57:23 +0100 |
commit | 78455025203b911c855f7cfc0d75270dd7351199 (patch) | |
tree | 5b887bdb8a9bb17f081645d5b00633e2fc01ea55 | |
parent | 52887972f4795fcefcdc206fe4790380d29f2f8c (diff) | |
download | dokka-78455025203b911c855f7cfc0d75270dd7351199.tar.gz dokka-78455025203b911c855f7cfc0d75270dd7351199.tar.bz2 dokka-78455025203b911c855f7cfc0d75270dd7351199.zip |
don't generate soft line break before closing parenthesis of parameter list if there are no parameters
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index dd63705b..77cad657 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -333,12 +333,15 @@ class KotlinLanguageService : LanguageService { identifierOrDeprecated(node) symbol("(") - renderList(node.details(DocumentationNode.Kind.Parameter)) { + val parameters = node.details(DocumentationNode.Kind.Parameter) + renderList(parameters) { indentedSoftLineBreak() renderParameter(it, renderMode) } if (needReturnType(node)) { - softLineBreak() + if (parameters.isNotEmpty()) { + softLineBreak() + } symbol(")") symbol(": ") renderType(node.detail(DocumentationNode.Kind.Type), renderMode) |