diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 18:38:22 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 18:38:22 +0400 |
commit | 69abe980af6d0e83c04d355ac27aa0acec56e0e9 (patch) | |
tree | 87efa586be5af092a049e5f882437a72ee1e69ee | |
parent | 073d8613fdc105baacaee4d138755f02f658acbe (diff) | |
download | dokka-69abe980af6d0e83c04d355ac27aa0acec56e0e9.tar.gz dokka-69abe980af6d0e83c04d355ac27aa0acec56e0e9.tar.bz2 dokka-69abe980af6d0e83c04d355ac27aa0acec56e0e9.zip |
Do not include block if no members, display description and summary.
-rw-r--r-- | src/Formats/MarkdownFormatService.kt | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Formats/MarkdownFormatService.kt b/src/Formats/MarkdownFormatService.kt index 27ebb8ce..2e541113 100644 --- a/src/Formats/MarkdownFormatService.kt +++ b/src/Formats/MarkdownFormatService.kt @@ -8,10 +8,11 @@ public class MarkdownFormatService(val locationService: LocationService, appendln(node.path.map { "[${it.name}](${locationService.relativeLocation(node, it, extension)})" }.joinToString(" / ")) appendln() appendln("# ${node.name}") + appendln(node.doc.summary) appendln("```") appendln(signatureGenerator.render(node)) appendln("```") - appendln(node.doc.summary) + appendln(node.doc.description) appendln() for (section in node.doc.sections) { append("### ") @@ -19,15 +20,17 @@ public class MarkdownFormatService(val locationService: LocationService, appendln(section.text) } - appendln("### Members") - appendln("| Name | Signature | Summary |") - appendln("|------|-----------|---------|") - for (member in node.members.sortBy { it.name }) { - val relativePath = locationService.relativeLocation(node, member, extension) - append("|[${member.name}](${relativePath})") - append("|${signatureGenerator.render(member)}") - append("|${member.doc.summary} ") - appendln("|") + if (node.members.any()) { + appendln("### Members") + appendln("| Name | Signature | Summary |") + appendln("|------|-----------|---------|") + for (member in node.members.sortBy { it.name }) { + val relativePath = locationService.relativeLocation(node, member, extension) + append("|[${member.name}](${relativePath})") + append("|`${signatureGenerator.render(member)}`") + append("|${member.doc.summary} ") + appendln("|") + } } } } |