diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-19 10:51:26 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-19 10:51:26 +0100 |
commit | 673bfdd186369856ae9bf8f82ead71079ce91996 (patch) | |
tree | 102899dc4dd5ca4636e6da6ca47fc0d16fd57b8a /src | |
parent | bbb8a682e5e79a9d73d3aeaab159bb88523d1de0 (diff) | |
download | dokka-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.kt | 10 |
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) { |