diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2019-12-13 16:24:16 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2019-12-16 16:43:35 +0100 |
commit | 288431f21b18f5311de77c9afcb29346cb7c6498 (patch) | |
tree | 0dbadd88532daae26f4edacba15cd43c3cc19b20 /plugins | |
parent | 54f587baf12ecf8f0115cb406203df14c4d6ab5d (diff) | |
download | dokka-288431f21b18f5311de77c9afcb29346cb7c6498.tar.gz dokka-288431f21b18f5311de77c9afcb29346cb7c6498.tar.bz2 dokka-288431f21b18f5311de77c9afcb29346cb7c6498.zip |
Changes naming and applies pull request's requirements
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt | 11 | ||||
-rw-r--r-- | plugins/xml/src/main/kotlin/XmlPlugin.kt | 4 |
2 files changed, 6 insertions, 9 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 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 ?: "<unnamed>", XMLKind.Main) } - text(element.briefDocstring, XMLKind.XmlList) + text(element.briefDocTagString, XMLKind.XmlList) } } |