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 ++++------- plugins/xml/src/main/kotlin/XmlPlugin.kt | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'plugins') 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 diff --git a/plugins/xml/src/main/kotlin/XmlPlugin.kt b/plugins/xml/src/main/kotlin/XmlPlugin.kt index 961a6387..1f496b33 100644 --- a/plugins/xml/src/main/kotlin/XmlPlugin.kt +++ b/plugins/xml/src/main/kotlin/XmlPlugin.kt @@ -38,14 +38,14 @@ object XmlTransformer : PageNodeTransformer { node.dri, platformData, XMLKind.XmlList, - dokkaContext.single(CoreExtensions.markdownToContentConverterFactory).invoke(dokkaContext), + dokkaContext.single(CoreExtensions.commentsToContentConverterFactory).invoke(dokkaContext), dokkaContext.logger ) { block("XML Attributes", 2, XMLKind.XmlList, elementsToAdd, platformData) { element -> link(element.dri, XMLKind.XmlList) { text(element.name ?: "", XMLKind.Main) } - text(element.briefDocstring, XMLKind.XmlList) + text(element.briefDocTagString, XMLKind.XmlList) } } -- cgit