aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-13 12:56:03 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-13 12:56:03 +0100
commit4a4601d6ccd1552c2254d43965f8b3bca7732e24 (patch)
tree2655c3d5306c461f46820ace054e942907fff6eb /src
parent4a018fa175bee9e7223232cbaf6365c81c540239 (diff)
downloaddokka-4a4601d6ccd1552c2254d43965f8b3bca7732e24.tar.gz
dokka-4a4601d6ccd1552c2254d43965f8b3bca7732e24.tar.bz2
dokka-4a4601d6ccd1552c2254d43965f8b3bca7732e24.zip
buildContent/buildContentTo don't need to be extension functions of DocumentationBuilder
Diffstat (limited to 'src')
-rw-r--r--src/Kotlin/ContentBuilder.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt
index 4d6938bf..6bb32f31 100644
--- a/src/Kotlin/ContentBuilder.kt
+++ b/src/Kotlin/ContentBuilder.kt
@@ -10,13 +10,13 @@ import org.intellij.markdown.*
import org.jetbrains.kotlin.psi.JetDeclarationWithBody
import org.jetbrains.kotlin.psi.JetBlockExpression
-public fun DocumentationBuilder.buildContent(tree: MarkdownNode): Content {
+public fun buildContent(tree: MarkdownNode): Content {
val result = Content()
buildContentTo(tree, result)
return result
}
-public fun DocumentationBuilder.buildContentTo(tree: MarkdownNode, target: ContentBlock) {
+public fun buildContentTo(tree: MarkdownNode, target: ContentBlock) {
// println(tree.toTestString())
val nodeStack = ArrayDeque<ContentBlock>()
nodeStack.push(target)
@@ -123,7 +123,7 @@ public fun DocumentationBuilder.buildContentTo(tree: MarkdownNode, target: Conte
private fun keepWhitespace(node: ContentNode) = node is ContentParagraph || node is ContentSection
-public fun DocumentationBuilder.buildInlineContentTo(tree: MarkdownNode, target: ContentBlock) {
+public fun buildInlineContentTo(tree: MarkdownNode, target: ContentBlock) {
val inlineContent = tree.children.singleOrNull { it.type == MarkdownElementTypes.PARAGRAPH }?.children ?: listOf(tree)
inlineContent.forEach {
buildContentTo(it, target)