aboutsummaryrefslogtreecommitdiff
path: root/src/Formats
diff options
context:
space:
mode:
Diffstat (limited to 'src/Formats')
-rw-r--r--src/Formats/KotlinWebsiteFormatService.kt4
-rw-r--r--src/Formats/MarkdownFormatService.kt4
-rw-r--r--src/Formats/StructuredFormatService.kt14
-rw-r--r--src/Formats/TextFormatService.kt4
4 files changed, 13 insertions, 13 deletions
diff --git a/src/Formats/KotlinWebsiteFormatService.kt b/src/Formats/KotlinWebsiteFormatService.kt
index 9fee14ff..ea54c97a 100644
--- a/src/Formats/KotlinWebsiteFormatService.kt
+++ b/src/Formats/KotlinWebsiteFormatService.kt
@@ -27,10 +27,6 @@ public class KotlinWebsiteFormatService(locationService: LocationService,
return "<a href=\"${href}\">${text}</a>"
}
- override fun appendText(to: StringBuilder, text: String) {
- to.appendln("<p markdown=\"1\">${text}</p>")
- }
-
override fun appendTable(to: StringBuilder, body: () -> Unit) {
to.appendln("<table class=\"api-docs-table\">")
body()
diff --git a/src/Formats/MarkdownFormatService.kt b/src/Formats/MarkdownFormatService.kt
index 54298e2a..8f9699c2 100644
--- a/src/Formats/MarkdownFormatService.kt
+++ b/src/Formats/MarkdownFormatService.kt
@@ -55,7 +55,9 @@ public open class MarkdownFormatService(locationService: LocationService,
}
override public fun appendText(to: StringBuilder, text: String) {
- to.append(text)
+ to.appendln()
+ to.appendln(text)
+ to.appendln()
}
override public fun appendHeader(to: StringBuilder, text: String, level: Int) {
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index 5287e688..280aa6b5 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -73,7 +73,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi
}
fun appendDescription(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) {
- val described = nodes.filter { !it.doc.isEmpty }
+ val described = nodes.filter { !it.content.isEmpty }
if (described.any()) {
val single = described.size == 1
appendHeader(to, "Description", 3)
@@ -81,11 +81,13 @@ public abstract class StructuredFormatService(val locationService: LocationServi
if (!single) {
appendBlockCode(to, formatText(location, languageService.render(node)))
}
- appendLine(to, formatText(location,node.doc.description))
+ appendLine(to, formatText(location,node.content.description))
appendLine(to)
- for ((label, section) in node.doc.sections) {
+ for ((label, section) in node.content.sections) {
if (label.startsWith("$"))
continue
+ if (node.members.any { it.name == label })
+ continue
appendLine(to, formatStrong(formatText(label)))
appendLine(to, formatText(location, section))
}
@@ -95,14 +97,14 @@ public abstract class StructuredFormatService(val locationService: LocationServi
fun appendSummary(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) {
val breakdownBySummary = nodes.groupByTo(LinkedHashMap()) { node ->
- node.doc.summary
+ formatText(location, node.summary)
}
for ((summary, items) in breakdownBySummary) {
items.forEach {
appendBlockCode(to, formatText(location, languageService.render(it)))
}
- appendLine(to, formatText(location, summary))
+ appendLine(to, summary)
appendLine(to)
}
}
@@ -131,7 +133,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi
appendText(to, formatLink(memberLocation))
}
appendTableCell(to) {
- val breakdownBySummary = members.groupBy { formatText(location, it.doc.summary) }
+ val breakdownBySummary = members.groupBy { formatText(location, it.summary) }
for ((summary, items) in breakdownBySummary) {
for (signature in items) {
appendBlockCode(to, formatText(location, languageService.render(signature)))
diff --git a/src/Formats/TextFormatService.kt b/src/Formats/TextFormatService.kt
index 63d2ce42..4e43cbcc 100644
--- a/src/Formats/TextFormatService.kt
+++ b/src/Formats/TextFormatService.kt
@@ -7,9 +7,9 @@ public class TextFormatService(val signatureGenerator: LanguageService) : Format
with (to) {
appendln(signatureGenerator.render(node))
appendln()
- appendln(node.doc.summary)
+ appendln(node.content.summary)
- for ((label, section) in node.doc.sections) {
+ for ((label, section) in node.content.sections) {
appendln(label)
}
}