From 288431f21b18f5311de77c9afcb29346cb7c6498 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Fri, 13 Dec 2019 16:24:16 +0100 Subject: Changes naming and applies pull request's requirements --- plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'plugins/mathjax/src') 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() - .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 -- cgit