aboutsummaryrefslogtreecommitdiff
path: root/plugins/mathjax
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-02-18 17:47:14 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-02-19 12:56:26 +0100
commitbee52be815bebd7012193728521636b5fbed2829 (patch)
tree5195190ed7944ee602ce177b04f7184d913c3bf6 /plugins/mathjax
parent16c84aff273a4bcef88f7e808e8b8eba2e7fd313 (diff)
downloaddokka-bee52be815bebd7012193728521636b5fbed2829.tar.gz
dokka-bee52be815bebd7012193728521636b5fbed2829.tar.bz2
dokka-bee52be815bebd7012193728521636b5fbed2829.zip
Rename extensions to make them more uniform
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()