diff options
| author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-09-14 13:49:54 +0200 |
|---|---|---|
| committer | Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> | 2020-10-07 02:36:57 +0200 |
| commit | ec637955575995011351b106d3a67194d21c4b15 (patch) | |
| tree | 5762d6ca0c49cc48dec01240380bc6fd436e81b0 /plugins/base/src/main/kotlin/transformers/pages/annotations | |
| parent | 7c4301a48af55e156538666b6e645d8d13caae9a (diff) | |
| download | dokka-ec637955575995011351b106d3a67194d21c4b15.tar.gz dokka-ec637955575995011351b106d3a67194d21c4b15.tar.bz2 dokka-ec637955575995011351b106d3a67194d21c4b15.zip | |
Introduce top-level DocTag
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages/annotations')
| -rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt index 7914e88f..acff5ada 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt @@ -1,7 +1,9 @@ package org.jetbrains.dokka.base.transformers.pages.annotations +import org.intellij.markdown.MarkdownElementTypes import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.* +import org.jetbrains.dokka.model.doc.CustomDocTag import org.jetbrains.dokka.model.doc.CustomTagWrapper import org.jetbrains.dokka.model.doc.Text import org.jetbrains.dokka.model.properties.WithExtraProperties @@ -73,10 +75,19 @@ class SinceKotlinTransformer(val context: DokkaContext) : DocumentableTransforme acc.mapValues { if (it.key == sourceSet) it.value.copy( it.value.children + listOf( - CustomTagWrapper(Text(version.dropWhile { it == '"' }.dropLastWhile { it == '"' }), "Since Kotlin") + CustomTagWrapper( + CustomDocTag( + listOf( + Text(version.dropWhile { it == '"' }.dropLastWhile { it == '"' } + ) + ), + name = MarkdownElementTypes.MARKDOWN_FILE.name + ), + "Since Kotlin" + ) ) ) else it.value } } ?: acc } -}
\ No newline at end of file +} |
