aboutsummaryrefslogtreecommitdiff
path: root/plugins/mathjax
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-02-21 23:06:59 +0300
committerGitHub <noreply@github.com>2022-02-21 23:06:59 +0300
commitc44bf5487bd32f90a4576859548f1db0e9355a07 (patch)
tree2954c68d9247007ecc255d397fb207b1cb2d1be1 /plugins/mathjax
parentf54597c754c9be6afb4ea374dc959dcc9fd551ce (diff)
downloaddokka-c44bf5487bd32f90a4576859548f1db0e9355a07.tar.gz
dokka-c44bf5487bd32f90a4576859548f1db0e9355a07.tar.bz2
dokka-c44bf5487bd32f90a4576859548f1db0e9355a07.zip
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
Diffstat (limited to 'plugins/mathjax')
-rw-r--r--plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt9
1 files changed, 4 insertions, 5 deletions
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