aboutsummaryrefslogtreecommitdiff
path: root/plugins/mathjax/src
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2019-12-13 16:24:16 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2019-12-16 16:43:35 +0100
commit288431f21b18f5311de77c9afcb29346cb7c6498 (patch)
tree0dbadd88532daae26f4edacba15cd43c3cc19b20 /plugins/mathjax/src
parent54f587baf12ecf8f0115cb406203df14c4d6ab5d (diff)
downloaddokka-288431f21b18f5311de77c9afcb29346cb7c6498.tar.gz
dokka-288431f21b18f5311de77c9afcb29346cb7c6498.tar.bz2
dokka-288431f21b18f5311de77c9afcb29346cb7c6498.zip
Changes naming and applies pull request's requirements
Diffstat (limited to 'plugins/mathjax/src')
-rw-r--r--plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
index 9b3c25c2..32294ea8 100644
--- a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
+++ b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.mathjax
-import model.doc.CustomTag
+
+import org.jetbrains.dokka.model.doc.CustomWrapperTag
import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.pages.ModulePageNode
import org.jetbrains.dokka.pages.PageNode
@@ -14,7 +15,7 @@ class MathjaxPlugin : DokkaPlugin() {
}
}
-private const val ANNOTATION = "@usesMathJax"
+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 {
@@ -32,9 +33,5 @@ object MathjaxTransformer : PageNodeTransformer {
get() = documentable?.platformInfo
?.flatMap { it.documentationNode.children }
.orEmpty()
- .filterIsInstance<CustomTag>()
- .let { true }
-// .any { it.name.contains("ref") && it.root.children.any {it.name} }
-
-
+ .any { (it as? CustomWrapperTag)?.name == ANNOTATION }
} \ No newline at end of file