diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-11-25 11:54:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-25 11:54:20 +0100 |
commit | 78850b5786b7b2a767db1dbd7132a374b2f4f227 (patch) | |
tree | b2ed4d4ec393a24e4445dc952296106ea30a0b5e /core/src/main | |
parent | b38654fe4f98964a63a4819023332cec03ce6ca1 (diff) | |
download | dokka-78850b5786b7b2a767db1dbd7132a374b2f4f227.tar.gz dokka-78850b5786b7b2a767db1dbd7132a374b2f4f227.tar.bz2 dokka-78850b5786b7b2a767db1dbd7132a374b2f4f227.zip |
Make searchbar an extension point (#1615)
* Make searchbar an extension point
* Change SearchbarDataInstaller to be a preprocessor
* Split navigation and navigation search
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/kotlin/pages/RendererSpecificPage.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/main/kotlin/pages/RendererSpecificPage.kt b/core/src/main/kotlin/pages/RendererSpecificPage.kt index d7f4491a..a057b95e 100644 --- a/core/src/main/kotlin/pages/RendererSpecificPage.kt +++ b/core/src/main/kotlin/pages/RendererSpecificPage.kt @@ -5,7 +5,8 @@ import org.jetbrains.dokka.model.DisplaySourceSet import org.jetbrains.dokka.renderers.Renderer import kotlin.reflect.KClass -typealias LocationResolver = (DRI, Set<DisplaySourceSet>) -> String +fun interface DriResolver: (DRI, Set<DisplaySourceSet>) -> String? +fun interface PageResolver: (PageNode, PageNode?) -> String? interface RendererSpecificPage : PageNode { val strategy: RenderingStrategy @@ -33,7 +34,8 @@ sealed class RenderingStrategy { class Callback(val instructions: Renderer.(PageNode) -> String): RenderingStrategy() data class Copy(val from: String) : RenderingStrategy() data class Write(val text: String) : RenderingStrategy() - data class LocationResolvableWrite(val contentToResolve: (LocationResolver) -> String) : RenderingStrategy() + data class DriLocationResolvableWrite(val contentToResolve: (DriResolver) -> String) : RenderingStrategy() + data class PageLocationResolvableWrite(val contentToResolve: (PageResolver) -> String) : RenderingStrategy() object DoNothing : RenderingStrategy() companion object { |