From 76e0db0359d8bdcdbbc7efddeccf115c2e5c731d Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 16 Feb 2015 16:48:11 +0100 Subject: API to create simple text nodes more easily --- src/Model/DocumentationNode.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Model/DocumentationNode.kt') 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) +} -- cgit