aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/pages
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-08-26 16:56:39 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-31 15:10:04 +0200
commit732d181e4908ed0ddc513e305addc71560c0e109 (patch)
tree740c3ebe3fa05c3702b30faf07c4f6f87c97e432 /core/src/main/kotlin/pages
parentf0524ce475695be163683cd1fdda2fab58ac0161 (diff)
downloaddokka-732d181e4908ed0ddc513e305addc71560c0e109.tar.gz
dokka-732d181e4908ed0ddc513e305addc71560c0e109.tar.bz2
dokka-732d181e4908ed0ddc513e305addc71560c0e109.zip
Let root package be represented as [root] to the user
Diffstat (limited to 'core/src/main/kotlin/pages')
-rw-r--r--core/src/main/kotlin/pages/PageNodes.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/kotlin/pages/PageNodes.kt b/core/src/main/kotlin/pages/PageNodes.kt
index 176c0993..a91887b4 100644
--- a/core/src/main/kotlin/pages/PageNodes.kt
+++ b/core/src/main/kotlin/pages/PageNodes.kt
@@ -92,6 +92,11 @@ class PackagePageNode(
override val children: List<PageNode>,
override val embeddedResources: List<String> = listOf()
) : PackagePage {
+
+ init {
+ require(name.isNotBlank()) { "PackagePageNode.name cannot be blank" }
+ }
+
override fun modified(name: String, children: List<PageNode>): PackagePageNode =
modified(name = name, content = this.content, children = children)