blob: 2fb2a0a37fd93180e5f15aa93440190167cc0a51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package org.jetbrains.dokka
public class TextFormatService(val signatureGenerator: SignatureGenerator) : FormatService {
override val extension: String = "txt"
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)
}
}
}
}
}
|