diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-11-26 18:12:23 +0100 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-11-26 18:20:23 +0100 |
commit | 7e87c8ac4b7b3987df1722d7b9a6d3b2c5b169a4 (patch) | |
tree | 4e622af9ec4003524fa1c593fae01a821e865a23 /plugins/xml | |
parent | 03a558bd255c4ac7e8ca3497f07177c2f1fda535 (diff) | |
download | dokka-7e87c8ac4b7b3987df1722d7b9a6d3b2c5b169a4.tar.gz dokka-7e87c8ac4b7b3987df1722d7b9a6d3b2c5b169a4.tar.bz2 dokka-7e87c8ac4b7b3987df1722d7b9a6d3b2c5b169a4.zip |
Fix XMLPlugin after changes in DRIs
Diffstat (limited to 'plugins/xml')
-rw-r--r-- | plugins/xml/src/main/kotlin/XmlPlugin.kt | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/xml/src/main/kotlin/XmlPlugin.kt b/plugins/xml/src/main/kotlin/XmlPlugin.kt index 5be0eca4..9de706b2 100644 --- a/plugins/xml/src/main/kotlin/XmlPlugin.kt +++ b/plugins/xml/src/main/kotlin/XmlPlugin.kt @@ -1,16 +1,14 @@ package org.jetbrains.dokka.xml import org.jetbrains.dokka.CoreExtensions -import org.jetbrains.dokka.DefaultExtra import org.jetbrains.dokka.DokkaConsoleLogger import org.jetbrains.dokka.Model.DocumentationNode import org.jetbrains.dokka.Model.dfs -import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.XMLMega import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.transformers.PageNodeTransformer -import javax.xml.bind.annotation.XmlList class XmlPlugin : DokkaPlugin() { val transformer by extending { @@ -28,13 +26,12 @@ object XmlTransformer : PageNodeTransformer { if (node !is ClassPageNode) node else { val refs = - node.documentationNode?.extra?.filterIsInstance<DefaultExtra>()?.filter { it.key == "@attr ref" } + node.documentationNode?.extra?.filterIsInstance<XMLMega>()?.filter { it.key == "@attr ref" } .orEmpty() val elementsToAdd = mutableListOf<DocumentationNode>() refs.forEach { ref -> - val toFind = DRI.from(ref.value) - input.documentationNode?.dfs { it.dri == toFind }?.let { elementsToAdd.add(it) } + input.documentationNode?.dfs { it.dri == ref.dri }?.let { elementsToAdd.add(it) } } val platformData = node.platforms().toSet() val refTable = DefaultPageContentBuilder.group( @@ -57,7 +54,7 @@ object XmlTransformer : PageNodeTransformer { val children = (node.content as ContentGroup).children node.modified(content = content.copy(children = children + refTable)) } - } + } private fun PageNode.platforms() = this.content.platforms.toList() }
\ No newline at end of file |