diff options
| author | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-14 20:25:08 +0100 |
|---|---|---|
| committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-14 20:25:08 +0100 |
| commit | 77c1f53cab3c2b143a3dafaf6c7bef49df5bcdb9 (patch) | |
| tree | 76faf3713906bfa45c8aa8199b60935e0f5bb0b7 /src/Formats | |
| parent | cfc0348e120df881461ada2d3299f0fb4314f49e (diff) | |
| parent | fac6872053a009dc083b2f0e487db0b94103d221 (diff) | |
| download | dokka-77c1f53cab3c2b143a3dafaf6c7bef49df5bcdb9.tar.gz dokka-77c1f53cab3c2b143a3dafaf6c7bef49df5bcdb9.tar.bz2 dokka-77c1f53cab3c2b143a3dafaf6c7bef49df5bcdb9.zip | |
Merge branch 'source-links'
Conflicts:
src/Kotlin/DocumentationBuilder.kt
Diffstat (limited to 'src/Formats')
| -rw-r--r-- | src/Formats/StructuredFormatService.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt index bfb69d1d..458fda35 100644 --- a/src/Formats/StructuredFormatService.kt +++ b/src/Formats/StructuredFormatService.kt @@ -121,6 +121,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi appendBlockCode(to, formatText(location, languageService.render(it))) it.appendOverrides(to) it.appendDeprecation(to) + it.appendSourceLink(to) } appendLine(to, summary) appendLine(to) @@ -148,6 +149,13 @@ 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)) + } + } + fun appendLocation(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) { val breakdownByName = nodes.groupBy { node -> node.name } for ((name, items) in breakdownByName) { |
