diff options
Diffstat (limited to 'core')
-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 +} |