diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-08-31 13:27:43 +0200 |
---|---|---|
committer | Andrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com> | 2020-09-08 12:52:59 +0200 |
commit | 883408f0d12abfba88434b41cd8d752afc7ebf35 (patch) | |
tree | ec693ce8e071fe7defa3cd760c5e7234697e59a2 /plugins/base/src/main/kotlin/transformers/pages | |
parent | 956e5ff3b21290d536b45f2a185f419416eb5554 (diff) | |
download | dokka-883408f0d12abfba88434b41cd8d752afc7ebf35.tar.gz dokka-883408f0d12abfba88434b41cd8d752afc7ebf35.tar.bz2 dokka-883408f0d12abfba88434b41cd8d752afc7ebf35.zip |
Apply requested changes
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt index 8f6f09fb..76bf0067 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt @@ -8,7 +8,7 @@ import org.jetbrains.dokka.model.DocumentableSource import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet import org.jetbrains.dokka.analysis.DescriptorDocumentableSource import org.jetbrains.dokka.analysis.PsiDocumentableSource -import org.jetbrains.dokka.model.WithExpectActual +import org.jetbrains.dokka.model.WithSources import org.jetbrains.dokka.model.toDisplaySourceSets import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaContext @@ -23,7 +23,7 @@ class SourceLinksTransformer(val context: DokkaContext, val builder: PageContent override fun invoke(input: RootPageNode) = input.transformContentPagesTree { node -> when (val documentable = node.documentable) { - is WithExpectActual -> resolveSources(documentable) + is WithSources -> resolveSources(documentable) .takeIf { it.isNotEmpty() } ?.let { node.addSourcesContent(it) } ?: node @@ -34,7 +34,7 @@ class SourceLinksTransformer(val context: DokkaContext, val builder: PageContent private fun getSourceLinks() = context.configuration.sourceSets .flatMap { it.sourceLinks.map { sl -> SourceLink(sl, it) } } - private fun resolveSources(documentable: WithExpectActual) = documentable.sources + private fun resolveSources(documentable: WithSources) = documentable.sources .mapNotNull { entry -> getSourceLinks().find { File(entry.value.path).startsWith(it.path) && it.sourceSetData == entry.key }?.let { Pair( |