diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-08-20 17:44:22 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-08-21 15:40:12 +0200 |
commit | 1634c8a0184749ae9314adecf409851c35e93775 (patch) | |
tree | c7dc2da6d1275ab5be46ac32d786d4be454a4102 /plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt | |
parent | 3c07bc1966c85de3351602c4e8798fa507c40e49 (diff) | |
download | dokka-1634c8a0184749ae9314adecf409851c35e93775.tar.gz dokka-1634c8a0184749ae9314adecf409851c35e93775.tar.bz2 dokka-1634c8a0184749ae9314adecf409851c35e93775.zip |
Make NavigationNode implement WithChildren
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt index 6e779931..f4c9a1f7 100644 --- a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt +++ b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt @@ -11,6 +11,7 @@ import org.jetbrains.dokka.base.renderers.sourceSets import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.DEnum import org.jetbrains.dokka.model.DEnumEntry +import org.jetbrains.dokka.model.withDescendants import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.transformers.pages.PageTransformer @@ -61,9 +62,7 @@ object NavigationPageInstaller : PageTransformer { name = "scripts/navigation-pane.json", children = emptyList(), strategy = RenderingStrategy.LocationResolvableWrite { resolver -> - val flattened = flattenNavigationNodes(listOf(nodes)) - val view = flattened.map { NavigationNodeView.from(it, resolver(it.dri, it.sourceSets)) } - mapper.writeValueAsString(view) + mapper.writeValueAsString(nodes.withDescendants().map { NavigationNodeView.from(it, resolver(it.dri, it.sourceSets)) }) }) return input.modified( |