diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-12-02 05:58:30 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-12-02 05:58:30 +0300 |
commit | d6d5df5bc04be5274446e9f37a3e52672083da36 (patch) | |
tree | 6246227dfeca08f725a4de8707dc2bd98aa6816c /core | |
parent | 54191cc5ff055942426e888a5a71f7bcf29c75f9 (diff) | |
download | dokka-d6d5df5bc04be5274446e9f37a3e52672083da36.tar.gz dokka-d6d5df5bc04be5274446e9f37a3e52672083da36.tar.bz2 dokka-d6d5df5bc04be5274446e9f37a3e52672083da36.zip |
Add actual relativePathToNode function
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/Generation/FileGenerator.kt | 2 | ||||
-rw-r--r-- | core/src/main/kotlin/Locations/LocationService.kt | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Generation/FileGenerator.kt b/core/src/main/kotlin/Generation/FileGenerator.kt index ea34a269..3d25e932 100644 --- a/core/src/main/kotlin/Generation/FileGenerator.kt +++ b/core/src/main/kotlin/Generation/FileGenerator.kt @@ -21,7 +21,7 @@ class FileGenerator @Inject constructor(@Named("outputDir") val rootFile: File) } fun locationWithoutExtension(node: DocumentationNode): FileLocation { - return FileLocation(File(rootFile, relativePathToNode(node.path.map { it.name }, node.members.any()))) + return FileLocation(File(rootFile, relativePathToNode(node))) } override fun buildPages(nodes: Iterable<DocumentationNode>) { diff --git a/core/src/main/kotlin/Locations/LocationService.kt b/core/src/main/kotlin/Locations/LocationService.kt index 8ea45dae..e453baca 100644 --- a/core/src/main/kotlin/Locations/LocationService.kt +++ b/core/src/main/kotlin/Locations/LocationService.kt @@ -44,6 +44,7 @@ fun relativePathToNode(qualifiedName: List<String>, hasMembers: Boolean): String } } +fun relativePathToNode(node: DocumentationNode) = relativePathToNode(node.path.map { it.name }, node.members.any()) // |