diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-04-14 15:15:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 15:15:48 +0200 |
commit | d0f83037a12441145d35090461ef3c91df4c4076 (patch) | |
tree | ace7e41d4048a848179409b648cf88a32659cae4 /core/src | |
parent | f27be3dfd3fa264f946161611638ad260a0ff392 (diff) | |
download | dokka-d0f83037a12441145d35090461ef3c91df4c4076.tar.gz dokka-d0f83037a12441145d35090461ef3c91df4c4076.tar.bz2 dokka-d0f83037a12441145d35090461ef3c91df4c4076.zip |
Handle html in kdoc (#1805)
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/model/doc/DocTag.kt | 4 | ||||
-rw-r--r-- | core/src/main/kotlin/pages/contentNodeProperties.kt | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/src/main/kotlin/model/doc/DocTag.kt b/core/src/main/kotlin/model/doc/DocTag.kt index 7698ebb3..a3d88508 100644 --- a/core/src/main/kotlin/model/doc/DocTag.kt +++ b/core/src/main/kotlin/model/doc/DocTag.kt @@ -5,6 +5,10 @@ import org.jetbrains.dokka.model.WithChildren sealed class DocTag : WithChildren<DocTag> { abstract val params: Map<String, String> + + companion object { + fun contentTypeParam(type: String): Map<String, String> = mapOf("content-type" to type) + } } data class A( diff --git a/core/src/main/kotlin/pages/contentNodeProperties.kt b/core/src/main/kotlin/pages/contentNodeProperties.kt index 67acef6d..cfd7f769 100644 --- a/core/src/main/kotlin/pages/contentNodeProperties.kt +++ b/core/src/main/kotlin/pages/contentNodeProperties.kt @@ -10,3 +10,7 @@ class SimpleAttr(val extraKey: String, val extraValue: String) : ExtraProperty<C fun header(value: String) = SimpleAttr("data-togglable", value) } } + +object HtmlContent : ExtraProperty<ContentNode>, ExtraProperty.Key<ContentNode, HtmlContent> { + override val key: ExtraProperty.Key<ContentNode, *> = this +} |