From a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 14 Jul 2014 15:00:33 +0400 Subject: Location services, formatting services, initial self-documentation output. --- src/Formats/TextFormatService.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Formats/TextFormatService.kt (limited to 'src/Formats/TextFormatService.kt') diff --git a/src/Formats/TextFormatService.kt b/src/Formats/TextFormatService.kt new file mode 100644 index 00000000..1da1c0d0 --- /dev/null +++ b/src/Formats/TextFormatService.kt @@ -0,0 +1,19 @@ +package org.jetbrains.dokka + +public class TextFormatService(val signatureGenerator: SignatureGenerator) : FormatService { + override val extension: String = "txt" + override fun format(node: DocumentationNode, to: StringBuilder) { + with (to) { + appendln(signatureGenerator.render(node)) + appendln() + appendln(node.doc.summary) + for (n in node.doc.summary.indices) + append("=") + + for (section in node.doc.sections) { + appendln(section.label) + appendln(section.text) + } + } + } +} \ No newline at end of file -- cgit