aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/ContentBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2014-12-30 16:34:47 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2014-12-30 16:34:47 +0100
commit5f47bc17630ef1457b36054dc8b19011d9d14132 (patch)
tree876215d35aa29f49d25645ad92edfe190f3364e6 /src/Kotlin/ContentBuilder.kt
parent7db96f8da4317cd290ccc9f988c534f10923dbbb (diff)
parent3fc3e33a0eff0198ed89cc94197cb21653bf1ca2 (diff)
downloaddokka-5f47bc17630ef1457b36054dc8b19011d9d14132.tar.gz
dokka-5f47bc17630ef1457b36054dc8b19011d9d14132.tar.bz2
dokka-5f47bc17630ef1457b36054dc8b19011d9d14132.zip
Merge pull request #8 from orangy/class-object
Include class object properties and functions in the list of class members
Diffstat (limited to 'src/Kotlin/ContentBuilder.kt')
-rw-r--r--src/Kotlin/ContentBuilder.kt19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt
index 0c82a522..0143feed 100644
--- a/src/Kotlin/ContentBuilder.kt
+++ b/src/Kotlin/ContentBuilder.kt
@@ -101,6 +101,17 @@ public fun DocumentationBuilder.buildContent(tree: MarkdownNode, descriptor: Dec
processChildren()
parent.append(nodeStack.pop())
}
+ MarkdownTokenTypes.COLON -> {
+ // TODO fix markdown parser
+ if (!isColonAfterSectionLabel(node)) {
+ parent.append(ContentText(node.text))
+ }
+ }
+ MarkdownTokenTypes.DOUBLE_QUOTE,
+ MarkdownTokenTypes.LT,
+ MarkdownTokenTypes.GT -> {
+ parent.append(ContentText(node.text))
+ }
else -> {
processChildren()
}
@@ -147,4 +158,10 @@ private fun DocumentationBuilder.resolveInScope(functionName: String, scope: Jet
}
return symbol
-} \ No newline at end of file
+}
+
+private fun isColonAfterSectionLabel(node: MarkdownNode): Boolean {
+ val parent = node.parent
+ return parent != null && parent.type == MarkdownElementTypes.SECTION && parent.children.size() >= 2 &&
+ node == parent.children[1];
+}