From f333e425440701e50361f61acc2f9cb2d10fac1a Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Thu, 16 Nov 2023 16:58:19 +0200 Subject: Implement custom code block renderers support (#3320) * multiple custom renderers can be installed to support different languages independently * only language and code properties are provided for extension --- dokka-subprojects/plugin-base/api/plugin-base.api | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dokka-subprojects/plugin-base/api') diff --git a/dokka-subprojects/plugin-base/api/plugin-base.api b/dokka-subprojects/plugin-base/api/plugin-base.api index 13f877e3..8d768b42 100644 --- a/dokka-subprojects/plugin-base/api/plugin-base.api +++ b/dokka-subprojects/plugin-base/api/plugin-base.api @@ -60,6 +60,7 @@ public final class org/jetbrains/dokka/base/DokkaBase : org/jetbrains/dokka/plug public final fun getExternalLocationProviderFactory ()Lorg/jetbrains/dokka/plugability/ExtensionPoint; public final fun getFallbackMerger ()Lorg/jetbrains/dokka/plugability/Extension; public final fun getFileWriter ()Lorg/jetbrains/dokka/plugability/Extension; + public final fun getHtmlCodeBlockRenderers ()Lorg/jetbrains/dokka/plugability/ExtensionPoint; public final fun getHtmlPreprocessors ()Lorg/jetbrains/dokka/plugability/ExtensionPoint; public final fun getHtmlRenderer ()Lorg/jetbrains/dokka/plugability/Extension; public final fun getImmediateHtmlCommandConsumer ()Lorg/jetbrains/dokka/plugability/ExtensionPoint; @@ -297,6 +298,12 @@ public final class org/jetbrains/dokka/base/renderers/html/CustomResourceInstall public fun invoke (Lorg/jetbrains/dokka/pages/RootPageNode;)Lorg/jetbrains/dokka/pages/RootPageNode; } +public abstract interface class org/jetbrains/dokka/base/renderers/html/HtmlCodeBlockRenderer { + public abstract fun buildCodeBlock (Lkotlinx/html/FlowContent;Ljava/lang/String;Ljava/lang/String;)V + public abstract fun isApplicableForDefinedLanguage (Ljava/lang/String;)Z + public abstract fun isApplicableForUndefinedLanguage (Ljava/lang/String;)Z +} + public final class org/jetbrains/dokka/base/renderers/html/HtmlFormatingUtilsKt { public static final fun buildBreakableDotSeparatedHtml (Lkotlinx/html/FlowContent;Ljava/lang/String;)V public static final fun buildBreakableText (Lkotlinx/html/FlowContent;Ljava/lang/String;)V -- cgit