aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-02-02 21:27:06 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-02-02 21:27:06 +0300
commit4d0496a1ddca7e62f40737fffa1d2f94c85d197c (patch)
tree8dc1422fdbcc1edf0c96bbe6db7a6bbd7db4c668 /core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
parent955e22485813b7ed99ee69fe4a25eb9c4d21a074 (diff)
downloaddokka-4d0496a1ddca7e62f40737fffa1d2f94c85d197c.tar.gz
Take See Also into additional section, fix section headers
Looks like Returns section minor broken (doesn't contain return type)
Diffstat (limited to 'core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt')
-rw-r--r--core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt27
1 files changed, 24 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
index d5f2039a2..ba662831f 100644
--- a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
+++ b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
@@ -626,13 +626,34 @@ open class JavaLayoutHtmlFormatOutputBuilder(
code { +value }
}
}
- for ((name, sections) in node.content.sections.groupBy { it.tag }) {
+
+ val sectionsByTag = node.content.sections.groupByTo(mutableMapOf()) { it.tag }
+
+ sectionsByTag.remove(ContentTags.SeeAlso)?.let { subjects ->
+ p { b { +"See Also" } }
+ ul {
+ subjects.forEach {
+ li { code { metaMarkup(it.children.flatMap { (it as ContentParagraph).children }) } }
+ }
+ }
+ }
+
+ for ((name, sections) in sectionsByTag) {
table {
- thead { tr { td { h3 { +name } } } }
+ thead {
+ tr {
+ th {
+ colSpan = "2"
+ +name
+ }
+ }
+ }
tbody {
sections.forEach {
tr {
- td { it.subjectName?.let { +it } }
+ if (it.subjectName != null) {
+ td { +it.subjectName }
+ }
td {
metaMarkup(it.children)
}