diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-16 16:48:11 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-16 16:48:11 +0100 |
commit | 76e0db0359d8bdcdbbc7efddeccf115c2e5c731d (patch) | |
tree | 30bebe0bc4e334a55c2aaaf927a9aee995ddc98f /src/Model/DocumentationNode.kt | |
parent | 614f5fafd60d845b1befc1f6eb6b18984b7ef351 (diff) | |
download | dokka-76e0db0359d8bdcdbbc7efddeccf115c2e5c731d.tar.gz dokka-76e0db0359d8bdcdbbc7efddeccf115c2e5c731d.tar.bz2 dokka-76e0db0359d8bdcdbbc7efddeccf115c2e5c731d.zip |
API to create simple text nodes more easily
Diffstat (limited to 'src/Model/DocumentationNode.kt')
-rw-r--r-- | src/Model/DocumentationNode.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Model/DocumentationNode.kt b/src/Model/DocumentationNode.kt index 64a854a8..ee948a87 100644 --- a/src/Model/DocumentationNode.kt +++ b/src/Model/DocumentationNode.kt @@ -121,3 +121,9 @@ fun DocumentationNode.append(child: DocumentationNode, kind: DocumentationRefere DocumentationReference.Kind.Owner -> child.addReferenceTo(this, DocumentationReference.Kind.Member) } } + +fun DocumentationNode.appendTextNode(text: String, + kind: DocumentationNode.Kind, + refKind: DocumentationReference.Kind = DocumentationReference.Kind.Detail) { + append(DocumentationNode(text, Content.Empty, kind), refKind) +} |