From c44bf5487bd32f90a4576859548f1db0e9355a07 Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Mon, 21 Feb 2022 23:06:59 +0300 Subject: Add option to merge implicit expect-actual declarations (#2316) * Add option to merge implicit expect-actual declarations * Merge entries, constructors * Fix StdLib integration test * Add doc --- plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/mathjax/src') diff --git a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt index 89c13202..669238ff 100644 --- a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt +++ b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt @@ -9,6 +9,7 @@ import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder.Doc import org.jetbrains.dokka.model.doc.CustomTagWrapper import org.jetbrains.dokka.pages.ContentPage import org.jetbrains.dokka.pages.RootPageNode +import org.jetbrains.dokka.pages.WithDocumentables import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.transformers.pages.PageTransformer @@ -35,12 +36,10 @@ object MathjaxTransformer : PageTransformer { } private val ContentPage.isNeedingMathjax - get() = documentable?.documentation?.values - ?.flatMap { it.children } - .orEmpty() - .any { (it as? CustomTagWrapper)?.name == ANNOTATION } + get() = (this as WithDocumentables).documentables.any { it.documentation.values + .flatMap { it.children } + .any { (it as? CustomTagWrapper)?.name == ANNOTATION } } } - object MathjaxTagContentProvider : CustomTagContentProvider { override fun isApplicable(customTag: CustomTagWrapper) = customTag.name == ANNOTATION -- cgit