From b8f2435e2db50c2053a9d880ab9573cb0bc2630e Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 21 Oct 2015 18:26:10 +0200 Subject: M15 code cleanup --- src/Formats/HtmlFormatService.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Formats/HtmlFormatService.kt') diff --git a/src/Formats/HtmlFormatService.kt b/src/Formats/HtmlFormatService.kt index 78d3cff2..74b10255 100644 --- a/src/Formats/HtmlFormatService.kt +++ b/src/Formats/HtmlFormatService.kt @@ -112,13 +112,13 @@ public open class HtmlFormatService(locationService: LocationService, override fun appendNodes(location: Location, to: StringBuilder, nodes: Iterable) { templateService.appendHeader(to, getPageTitle(nodes)) - super.appendNodes(location, to, nodes) + super.appendNodes(location, to, nodes) templateService.appendFooter(to) } override fun appendOutline(location: Location, to: StringBuilder, nodes: Iterable) { templateService.appendHeader(to, "Module Contents") - super.appendOutline(location, to, nodes) + super.appendOutline(location, to, nodes) templateService.appendFooter(to) } @@ -144,16 +144,16 @@ public open class HtmlFormatService(locationService: LocationService, fun getPageTitle(nodes: Iterable): String? { val breakdownByLocation = nodes.groupBy { node -> formatPageTitle(node) } - return breakdownByLocation.keySet().singleOrNull() + return breakdownByLocation.keys.singleOrNull() } fun formatPageTitle(node: DocumentationNode): String { val path = node.path - if (path.size() == 1) { + if (path.size == 1) { return path.first().name } - val qualifiedName = path.drop(1).map { it.name }.filter { it.length() > 0 }.join(".") - if (qualifiedName.length() == 0 && path.size() == 2) { + val qualifiedName = path.drop(1).map { it.name }.filter { it.length > 0 }.joinToString(".") + if (qualifiedName.length == 0 && path.size == 2) { return path.first().name + " / root package" } return path.first().name + " / " + qualifiedName -- cgit