diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2016-03-31 16:31:07 +0200 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2016-03-31 16:31:07 +0200 |
commit | 382f7df5b47b7b4fd5c9930b26a2e0ededdb17be (patch) | |
tree | 4f798ad47f523023ab17ab09e7c89ee50c4f1b8d | |
parent | 3ed824ed77e87b09fc997189b74f1201e6e03b14 (diff) | |
download | dokka-382f7df5b47b7b4fd5c9930b26a2e0ededdb17be.tar.gz dokka-382f7df5b47b7b4fd5c9930b26a2e0ededdb17be.tar.bz2 dokka-382f7df5b47b7b4fd5c9930b26a2e0ededdb17be.zip |
Don't use @Inject on constructors with default parameter values. Resolves #49
-rw-r--r-- | core/src/main/kotlin/Formats/JekyllFormatService.kt | 10 | ||||
-rw-r--r-- | core/src/main/kotlin/Formats/MarkdownFormatService.kt | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/core/src/main/kotlin/Formats/JekyllFormatService.kt b/core/src/main/kotlin/Formats/JekyllFormatService.kt index f81257d6..9271e3a9 100644 --- a/core/src/main/kotlin/Formats/JekyllFormatService.kt +++ b/core/src/main/kotlin/Formats/JekyllFormatService.kt @@ -2,12 +2,14 @@ package org.jetbrains.dokka import com.google.inject.Inject -open class JekyllFormatService - @Inject constructor(locationService: LocationService, - signatureGenerator: LanguageService, - linkExtension: String = "md") +open class JekyllFormatService(locationService: LocationService, + signatureGenerator: LanguageService, + linkExtension: String) : MarkdownFormatService(locationService, signatureGenerator, linkExtension) { + @Inject constructor(locationService: LocationService, + signatureGenerator: LanguageService): this(locationService, signatureGenerator, "md") + override fun appendNodes(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) { to.appendln("---") appendFrontMatter(nodes, to) diff --git a/core/src/main/kotlin/Formats/MarkdownFormatService.kt b/core/src/main/kotlin/Formats/MarkdownFormatService.kt index 7a93801e..4f5b9751 100644 --- a/core/src/main/kotlin/Formats/MarkdownFormatService.kt +++ b/core/src/main/kotlin/Formats/MarkdownFormatService.kt @@ -3,11 +3,13 @@ package org.jetbrains.dokka import com.google.inject.Inject -open class MarkdownFormatService - @Inject constructor(locationService: LocationService, - signatureGenerator: LanguageService, - linkExtension: String = "md") +open class MarkdownFormatService(locationService: LocationService, + signatureGenerator: LanguageService, + linkExtension: String) : StructuredFormatService(locationService, signatureGenerator, "md", linkExtension) { + @Inject constructor(locationService: LocationService, + signatureGenerator: LanguageService): this(locationService, signatureGenerator, "md") + override fun formatBreadcrumbs(items: Iterable<FormatLink>): String { return items.map { formatLink(it) }.joinToString(" / ") } |