diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Formats/StructuredFormatService.kt | 8 | ||||
-rw-r--r-- | src/Generation/FileGenerator.kt | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt index 13af77ce..5ec86486 100644 --- a/src/Formats/StructuredFormatService.kt +++ b/src/Formats/StructuredFormatService.kt @@ -65,7 +65,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi } open public fun appendLocation(to: StringBuilder, nodes: Iterable<DocumentationNode>) { - val breakdownByName = nodes.groupByTo(LinkedHashMap()) { node -> node.name } + val breakdownByName = nodes.groupBy { node -> node.name } for ((name, items) in breakdownByName) { appendHeader(to, formatText(name)) appendSummary(to, items) @@ -74,7 +74,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi } override fun appendNodes(to: StringBuilder, nodes: Iterable<DocumentationNode>) { - val breakdownByLocation = nodes.groupByTo(LinkedHashMap()) { node -> + val breakdownByLocation = nodes.groupBy { node -> formatBreadcrumbs(node.path.map { link(node, it) }) } @@ -89,7 +89,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi appendHeader(to, "Members", 3) val children = node.members.sortBy { it.name } - val membersMap = children.groupByTo(LinkedHashMap()) { link(node, it) } + val membersMap = children.groupBy { link(node, it) } appendTable(to) { appendTableBody(to) { @@ -99,7 +99,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi appendText(to, formatLink(location)) } appendTableCell(to) { - val breakdownBySummary = members.groupByTo(LinkedHashMap()) { it.doc.summary } + val breakdownBySummary = members.groupBy { it.doc.summary } for ((summary, items) in breakdownBySummary) { if (!summary.isEmpty()) { appendText(to, formatText(summary)) diff --git a/src/Generation/FileGenerator.kt b/src/Generation/FileGenerator.kt index 5221c400..3e410d39 100644 --- a/src/Generation/FileGenerator.kt +++ b/src/Generation/FileGenerator.kt @@ -12,7 +12,7 @@ public class FileGenerator(val signatureGenerator: LanguageService, public fun buildOutline(node: DocumentationNode): Unit = buildOutlines(listOf(node)) public fun buildPages(nodes: Iterable<DocumentationNode>) { - for ((location, items) in nodes.groupByTo(LinkedHashMap()) { locationService.location(it) }) { + for ((location, items) in nodes.groupBy { locationService.location(it) }) { val file = location.file.appendExtension(formatService.extension) file.getParentFile()?.mkdirs() FileOutputStream(file).use { @@ -25,7 +25,7 @@ public class FileGenerator(val signatureGenerator: LanguageService, } public fun buildOutlines(nodes: Iterable<DocumentationNode>) { - for ((location, items) in nodes.groupByTo(LinkedHashMap()) { locationService.location(it) }) { + for ((location, items) in nodes.groupBy { locationService.location(it) }) { val file = location.file.appendExtension("yml") // TODO: hardcoded file.getParentFile()?.mkdirs() FileOutputStream(file).use { |