diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 15:00:33 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 15:00:33 +0400 |
commit | a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d (patch) | |
tree | c68610d2003d2a4712b3fbc95561ac20390a161d /src/Formats/TextFormatService.kt | |
parent | 6168541bd5bb141c40a1e2a909afa84441b35ed5 (diff) | |
download | dokka-a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d.tar.gz dokka-a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d.tar.bz2 dokka-a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d.zip |
Location services, formatting services, initial self-documentation output.
Diffstat (limited to 'src/Formats/TextFormatService.kt')
-rw-r--r-- | src/Formats/TextFormatService.kt | 19 |
1 files changed, 19 insertions, 0 deletions
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 |