diff options
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/renderers/HtmlRenderer.kt | 6 | ||||
-rw-r--r-- | core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt | 21 |
2 files changed, 4 insertions, 23 deletions
diff --git a/core/src/main/kotlin/renderers/HtmlRenderer.kt b/core/src/main/kotlin/renderers/HtmlRenderer.kt index bf4090f4..c8d2f619 100644 --- a/core/src/main/kotlin/renderers/HtmlRenderer.kt +++ b/core/src/main/kotlin/renderers/HtmlRenderer.kt @@ -30,13 +30,11 @@ open class HtmlRenderer(fileWriter: FileWriter, locationProvider: LocationProvid return buildNavigationWithContext(page, page) } - override fun buildGroup(children: List<ContentNode>, pageContext: PageNode): String = - children.find { it is ContentLink }?.build(pageContext) + "</td>\n" + - "<td>" + children.filterNot { it is ContentLink }.joinToString("\n") { it.build(pageContext) } + override fun buildGroup(children: List<ContentNode>, pageContext: PageNode): String = children.joinToString("</td>\n<td>\n") { it.build(pageContext) } override fun buildBlock(name: String, content: List<ContentNode>, pageContext: PageNode): String = buildHeader(3, name) + "<table>\n<tr>\n<td>\n" + - content.joinToString("</td>\n</tr>\n<tr>\n<td>") { "(" + it.dci.platformDataList.map {it.platformName}.joinToString() + ") " + it.build(pageContext) } + "</td></tr>\n</table>" + content.joinToString("</td>\n</tr>\n<tr>\n<td>") { "(" + it.dci.platformDataList.map { it.platformName }.joinToString() + ") " + it.build(pageContext) } + "</td></tr>\n</table>" override fun renderPage(page: PageNode) { val pageText = buildStartHtml(page) + buildPageContent(page) + buildEndHtml() diff --git a/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt b/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt index 5db50e35..5e351d95 100644 --- a/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt +++ b/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt @@ -180,7 +180,7 @@ class DefaultDocumentationToPageTransformer( } private fun ContentBuilder.type(t: KotlinType) { - t.constructor.declarationDescriptor?.also { link(it.fqNameSafe.asString(), DRI.from(it)) } + t.constructor.declarationDescriptor?.also { link(it.fqNameSafe.pathSegments().last().asString(), DRI.from(it)) } ?: run { logger.error("type $t cannot be resolved") text("???") @@ -189,21 +189,4 @@ class DefaultDocumentationToPageTransformer( type(it.type) } } -} - -fun DocumentationNode<*>.identifier(platformData: List<PlatformData>): List<ContentNode> { -// when(this) { -// is Class -> ContentText(this.descriptor.toString(), platforms), ContentText("(") this.properties.map { ContentText(it.descriptor.visibility + " " + it.descriptor.name + ":" + ),} -// is Function -> -// is Property -> -// else -> return emptyList() -// } - TODO() -} -// take this ^ from old dokka -/* -pages are equal if the content and the children are equal -we then can merge the content by merging the platforms -and take an arbitrary set of the children -but we need to recursively process all of the children anyway - */
\ No newline at end of file +}
\ No newline at end of file |