aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-03-19 10:51:26 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-03-19 10:51:26 +0100
commit673bfdd186369856ae9bf8f82ead71079ce91996 (patch)
tree102899dc4dd5ca4636e6da6ca47fc0d16fd57b8a /src
parentbbb8a682e5e79a9d73d3aeaab159bb88523d1de0 (diff)
downloaddokka-673bfdd186369856ae9bf8f82ead71079ce91996.tar.gz
dokka-673bfdd186369856ae9bf8f82ead71079ce91996.tar.bz2
dokka-673bfdd186369856ae9bf8f82ead71079ce91996.zip
don't generate empty <code> blocks for non-existing signatures (e.g. external classes)
Diffstat (limited to 'src')
-rw-r--r--src/Formats/StructuredFormatService.kt10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index a3803011..233dd9e3 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -232,9 +232,13 @@ public abstract class StructuredFormatService(locationService: LocationService,
for ((summary, items) in breakdownBySummary) {
val signatureTexts = items map { signature ->
val signatureText = languageService.render(signature, RenderMode.SUMMARY)
- val signatureAsCode = ContentCode()
- signatureAsCode.append(signatureText)
- formatText(location, signatureAsCode)
+ if (signatureText is ContentBlock && signatureText.isEmpty()) {
+ ""
+ } else {
+ val signatureAsCode = ContentCode()
+ signatureAsCode.append(signatureText)
+ formatText(location, signatureAsCode)
+ }
}
signatureTexts.subList(0, signatureTexts.size()-1).forEach {
appendAsSignature(to) {