diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 21:15:04 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 21:15:04 +0400 |
commit | cd7084ddc4e6e7f32a35d265bfb1307fdaf27011 (patch) | |
tree | a01d7ded59d59cf96d67ad085424294e36f014a7 /src/Formats/TextFormatService.kt | |
parent | 0b2e3467bb6ae3d6df935063f0bc9579cd392c98 (diff) | |
download | dokka-cd7084ddc4e6e7f32a35d265bfb1307fdaf27011.tar.gz dokka-cd7084ddc4e6e7f32a35d265bfb1307fdaf27011.tar.bz2 dokka-cd7084ddc4e6e7f32a35d265bfb1307fdaf27011.zip |
Refactor to multiple-nodes formatting, implement smarter markdown format service.
Diffstat (limited to 'src/Formats/TextFormatService.kt')
-rw-r--r-- | src/Formats/TextFormatService.kt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Formats/TextFormatService.kt b/src/Formats/TextFormatService.kt index 1da1c0d0..2fb2a0a3 100644 --- a/src/Formats/TextFormatService.kt +++ b/src/Formats/TextFormatService.kt @@ -2,17 +2,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("=") + override fun format(nodes: Iterable<DocumentationNode>, to: StringBuilder) { + for (node in nodes) { + 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) + for (section in node.doc.sections) { + appendln(section.label) + appendln(section.text) + } } } } |