aboutsummaryrefslogtreecommitdiff
path: root/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt')
-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