aboutsummaryrefslogtreecommitdiff
path: root/plugins/mathjax
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mathjax')
-rw-r--r--plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
index 52723157..cded0929 100644
--- a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
+++ b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
@@ -1,13 +1,12 @@
package org.jetbrains.dokka.mathjax
-import org.jetbrains.dokka.model.doc.CustomWrapperTag
import org.jetbrains.dokka.CoreExtensions
+import org.jetbrains.dokka.model.doc.CustomWrapperTag
import org.jetbrains.dokka.pages.ContentPage
-import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaPlugin
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
+import org.jetbrains.dokka.transformers.pages.PageTransformer
class MathjaxPlugin : DokkaPlugin() {
val transformer by extending {
@@ -18,7 +17,7 @@ class MathjaxPlugin : DokkaPlugin() {
private const val ANNOTATION = "usesMathJax"
private const val LIB_PATH = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS_SVG&latest"
-object MathjaxTransformer : PageNodeTransformer {
+object MathjaxTransformer : PageTransformer {
override fun invoke(input: RootPageNode) = input.transformContentPagesTree {
it.modified(
embeddedResources = it.embeddedResources + if (it.isNeedingMathjax) listOf(LIB_PATH) else emptyList()