From ba769f0695aaa9719b62ca32028fd3d24442f5ec Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Mon, 17 Feb 2020 11:27:37 +0100 Subject: Moves comments to content conversion to base plugin --- core/src/main/kotlin/CoreExtensions.kt | 2 - core/src/main/kotlin/DokkaGenerator.kt | 2 +- .../kotlin/pages/CommentsToContentConverter.kt | 13 --- .../main/kotlin/pages/DocTagToContentConverter.kt | 97 ---------------------- .../main/kotlin/plugability/DefaultExtensions.kt | 5 +- core/src/main/kotlin/plugability/DokkaPlugin.kt | 12 ++- .../documentation/DocumentablesToPageTranslator.kt | 2 +- 7 files changed, 11 insertions(+), 122 deletions(-) delete mode 100644 core/src/main/kotlin/pages/CommentsToContentConverter.kt delete mode 100644 core/src/main/kotlin/pages/DocTagToContentConverter.kt (limited to 'core/src') diff --git a/core/src/main/kotlin/CoreExtensions.kt b/core/src/main/kotlin/CoreExtensions.kt index 0f88b492..859e850e 100644 --- a/core/src/main/kotlin/CoreExtensions.kt +++ b/core/src/main/kotlin/CoreExtensions.kt @@ -1,6 +1,5 @@ package org.jetbrains.dokka -import org.jetbrains.dokka.pages.CommentsToContentConverter import org.jetbrains.dokka.plugability.ExtensionPoint import org.jetbrains.dokka.renderers.Renderer import org.jetbrains.dokka.renderers.OutputWriter @@ -27,7 +26,6 @@ object CoreExtensions { val pageTransformer by coreExtension() val renderer by coreExtension() - val commentsToContentConverter by coreExtension() val locationProviderFactory by coreExtension() val outputWriter by coreExtension() diff --git a/core/src/main/kotlin/DokkaGenerator.kt b/core/src/main/kotlin/DokkaGenerator.kt index 1ad93f4f..8897e68d 100644 --- a/core/src/main/kotlin/DokkaGenerator.kt +++ b/core/src/main/kotlin/DokkaGenerator.kt @@ -88,7 +88,7 @@ class DokkaGenerator( fun createPages( transformedDocumentation: Module, context: DokkaContext - ) = context.single(CoreExtensions.documentablesToPageTranslator).invoke(transformedDocumentation, context) + ) = context.single(CoreExtensions.documentablesToPageTranslator).invoke(transformedDocumentation) fun transformPages( pages: RootPageNode, diff --git a/core/src/main/kotlin/pages/CommentsToContentConverter.kt b/core/src/main/kotlin/pages/CommentsToContentConverter.kt deleted file mode 100644 index 78c7ff4c..00000000 --- a/core/src/main/kotlin/pages/CommentsToContentConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.jetbrains.dokka.pages - -import org.jetbrains.dokka.model.doc.DocTag - -interface CommentsToContentConverter { - fun buildContent( - docTag: DocTag, - dci: DCI, - platforms: Set, - styles: Set