aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/model/properties/PropertyContainer.kt3
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt4
2 files changed, 5 insertions, 2 deletions
diff --git a/core/src/main/kotlin/model/properties/PropertyContainer.kt b/core/src/main/kotlin/model/properties/PropertyContainer.kt
index e1e0250e..6009bfe0 100644
--- a/core/src/main/kotlin/model/properties/PropertyContainer.kt
+++ b/core/src/main/kotlin/model/properties/PropertyContainer.kt
@@ -23,6 +23,9 @@ class PropertyContainer<C : Any> internal constructor(
}
}
+operator fun <D: Any> PropertyContainer<D>.plus(prop: ExtraProperty<D>?): PropertyContainer<D> =
+ if (prop == null) this else PropertyContainer(map + (prop.key to prop))
+
interface WithExtraProperties<C : Any> {
val extra: PropertyContainer<C>
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index dc23a082..4e4c0fca 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -214,11 +214,11 @@ interface Kind
enum class ContentKind : Kind {
Comment, Constructors, Functions, Parameters, Properties, Classlikes, Packages, Symbol, Sample, Main, BriefComment,
- Empty, Source, TypeAliases, Cover, Inheritors, SourceSetDependantHint, Annotations;
+ Empty, Source, TypeAliases, Cover, Inheritors, SourceSetDependantHint, Extensions, Annotations;
companion object {
private val platformTagged =
- setOf(Constructors, Functions, Properties, Classlikes, Packages, Source, TypeAliases, Inheritors)
+ setOf(Constructors, Functions, Properties, Classlikes, Packages, Source, TypeAliases, Inheritors, Extensions)
fun shouldBePlatformTagged(kind: Kind): Boolean = kind in platformTagged
}