aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-03-23 18:52:05 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-03-23 18:52:05 +0100
commit76e4d3cbc7cbbe1d35fb2e0c1ba59d3c86e0daf2 (patch)
treeefc5fc2e5dce290fbca9d55c12f0056b96735c3b /src/Kotlin/DocumentationBuilder.kt
parent73bd875b621fedce84015c50b6954509f4978a6d (diff)
downloaddokka-76e4d3cbc7cbbe1d35fb2e0c1ba59d3c86e0daf2.tar.gz
dokka-76e4d3cbc7cbbe1d35fb2e0c1ba59d3c86e0daf2.tar.bz2
dokka-76e4d3cbc7cbbe1d35fb2e0c1ba59d3c86e0daf2.zip
parse included Markdown files to retrieve documentation for modules and packages
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index e193817a..8910c3e3 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -389,7 +389,8 @@ class DocumentationBuilder(val session: ResolveSession,
return this
}
- fun DocumentationNode.appendFragments(fragments: Collection<PackageFragmentDescriptor>) {
+ fun DocumentationModule.appendFragments(fragments: Collection<PackageFragmentDescriptor>,
+ packageContent: Map<String, Content>) {
val descriptors = hashMapOf<String, List<DeclarationDescriptor>>()
for ((name, parts) in fragments.groupBy { it.fqName }) {
descriptors.put(name.asString(), parts.flatMap { it.getMemberScope().getAllDescriptors() })
@@ -397,7 +398,7 @@ class DocumentationBuilder(val session: ResolveSession,
for ((packageName, declarations) in descriptors) {
if (options.skipEmptyPackages && declarations.none { it.isDocumented()}) continue
logger.info(" package $packageName: ${declarations.count()} declarations")
- val packageNode = findOrCreatePackageNode(packageName)
+ val packageNode = findOrCreatePackageNode(packageName, packageContent)
val externalClassNodes = hashMapOf<FqName, DocumentationNode>()
declarations.forEach { descriptor ->
if (descriptor.isDocumented()) {