diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-23 19:18:39 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-23 19:18:39 +0100 |
commit | d9f135d0a783461cd8650440230a5c0c8613ea29 (patch) | |
tree | 5cdff74fdfdbd028e68caaf1830f33b7b555a292 /src/Formats | |
parent | a19e05b7dc915ca534416e4a8532df8db72b3499 (diff) | |
download | dokka-d9f135d0a783461cd8650440230a5c0c8613ea29.tar.gz dokka-d9f135d0a783461cd8650440230a5c0c8613ea29.tar.bz2 dokka-d9f135d0a783461cd8650440230a5c0c8613ea29.zip |
don't show redundant signatures for packages
Diffstat (limited to 'src/Formats')
-rw-r--r-- | src/Formats/KotlinWebsiteFormatService.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Formats/KotlinWebsiteFormatService.kt b/src/Formats/KotlinWebsiteFormatService.kt index 01df0501..3b95a915 100644 --- a/src/Formats/KotlinWebsiteFormatService.kt +++ b/src/Formats/KotlinWebsiteFormatService.kt @@ -20,13 +20,16 @@ public class KotlinWebsiteFormatService(locationService: LocationService, return "" } - override public fun formatCode(code: String): String = "<code>$code</code>" + override public fun formatCode(code: String): String = if (code.length() > 0) "<code>$code</code>" else "" override fun formatStrikethrough(text: String): String = "<s>$text</s>" override fun appendAsSignature(to: StringBuilder, block: () -> Unit) { + val oldLength = to.length() block() - to.append("<br/>") // since we've used HTML to format the signature, add an HTML line break following it + if (to.length() > oldLength) { + to.append("<br/>") // since we've used HTML to format the signature, add an HTML line break following it + } } override fun formatLink(text: String, href: String): String { |