diff options
author | Szymon Świstun <sswistun@virtuslab.com> | 2020-02-04 11:42:57 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-02-04 14:39:05 +0100 |
commit | 6f241300f799001e266b0301c56c1a8daad5ba24 (patch) | |
tree | 63c11ada222156d4ea5c427d4c077a68180a0ef1 /core/src/main/kotlin/resolvers/DefaultLocationProvider.kt | |
parent | 0508be47cbbc5a160217aa35233398044d8cdaf8 (diff) | |
download | dokka-6f241300f799001e266b0301c56c1a8daad5ba24.tar.gz dokka-6f241300f799001e266b0301c56c1a8daad5ba24.tar.bz2 dokka-6f241300f799001e266b0301c56c1a8daad5ba24.zip |
dri sets
Diffstat (limited to 'core/src/main/kotlin/resolvers/DefaultLocationProvider.kt')
-rw-r--r-- | core/src/main/kotlin/resolvers/DefaultLocationProvider.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt b/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt index 48ea5316..cac7b740 100644 --- a/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt +++ b/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt @@ -17,8 +17,9 @@ open class DefaultLocationProvider( protected val extension = dokkaContext.single(CoreExtensions.fileExtension) protected val pagesIndex: Map<DRI, ContentPage> = pageGraphRoot.asSequence().filterIsInstance<ContentPage>() - .groupingBy { it.dri } - .aggregate { dri, _, page, first -> + .map { it.dri.map { dri -> dri to it } }.flatten() + .groupingBy { it.first } + .aggregate { dri, _, (_, page), first -> if (first) page else throw AssertionError("Multiple pages associated with dri: $dri") } |