aboutsummaryrefslogtreecommitdiff
path: root/src/Formats/StructuredFormatService.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-10 19:35:27 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-10 19:35:27 +0100
commitebbf265dbe9d5fe37e56c9baa567edaf21dd16fa (patch)
tree09c521046ed883024690f1ed7ceb7f4dd840e411 /src/Formats/StructuredFormatService.kt
parenta187baa606f1dd6ce63bc38247f4b5331d78f42b (diff)
downloaddokka-ebbf265dbe9d5fe37e56c9baa567edaf21dd16fa.tar.gz
dokka-ebbf265dbe9d5fe37e56c9baa567edaf21dd16fa.tar.bz2
dokka-ebbf265dbe9d5fe37e56c9baa567edaf21dd16fa.zip
much nicer html output for overloads
Diffstat (limited to 'src/Formats/StructuredFormatService.kt')
-rw-r--r--src/Formats/StructuredFormatService.kt14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index 0eb042ca..8309d053 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -85,16 +85,17 @@ public abstract class StructuredFormatService(val locationService: LocationServi
for ((summary, items) in breakdownBySummary) {
items.forEach {
- appendBlockCode(to, formatText(location, languageService.render(it)))
+ to.append(formatCode(formatText(location, languageService.render(it))))
+ it.appendSourceLink(to)
it.appendOverrides(to)
it.appendDeprecation(to)
- it.appendSourceLink(to)
}
// All items have exactly the same documentation, so we can use any item to render it
val item = items.first()
- appendLine(to, formatText(location, item.content.summary))
- appendLine(to)
+ to.append(formatText(location, item.content.summary))
appendDescription(location, to, item)
+ appendLine(to)
+ appendLine(to)
}
}
@@ -153,7 +154,10 @@ public abstract class StructuredFormatService(val locationService: LocationServi
private fun DocumentationNode.appendSourceLink(to: StringBuilder) {
val sourceUrl = details(DocumentationNode.Kind.SourceUrl).firstOrNull()
if (sourceUrl != null) {
- appendLine(to, formatLink("Source", sourceUrl.name))
+ to.append(" ")
+ appendLine(to, formatLink("(source)", sourceUrl.name))
+ } else {
+ appendLine(to)
}
}