diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-09-26 22:15:03 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-09-26 22:15:03 +0300 |
commit | 960e022f7b94d858942f938dd9f7b877f2435964 (patch) | |
tree | 43c98182fa42513525f4e2875c2b2bb26ab93175 | |
parent | cffc71e39f20a368f2ffe10bf0c8aa4432dee7fc (diff) | |
download | dokka-960e022f7b94d858942f938dd9f7b877f2435964.tar.gz dokka-960e022f7b94d858942f938dd9f7b877f2435964.tar.bz2 dokka-960e022f7b94d858942f938dd9f7b877f2435964.zip |
Take implied platforms back
-rw-r--r-- | core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt index 66eb60c4..718c8d35 100644 --- a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt +++ b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt @@ -20,7 +20,7 @@ open class KotlinWebsiteHtmlOutputBuilder( generator: NodeLocationAwareGenerator, languageService: LanguageService, extension: String, - impliedPlatforms: List<String>, + val impliedPlatforms: List<String>, templateService: HtmlTemplateService ) : HtmlOutputBuilder(to, location, generator, languageService, extension, impliedPlatforms, templateService) { private var needHardLineBreaks = false @@ -128,7 +128,10 @@ open class KotlinWebsiteHtmlOutputBuilder( val kotlinVersion = platforms.singleOrNull(String::isKotlinVersion) val jreVersion = platforms.singleOrNull(String::isJREVersion) - val targetPlatforms = platforms.filterNot { it.isKotlinVersion() || it.isJREVersion() } + val targetPlatforms = + platforms.filterNot { it.isKotlinVersion() || it.isJREVersion() } + .takeUnless { it.intersect(impliedPlatforms).containsAll(impliedPlatforms) } + .orEmpty() val kotlinVersionAttr = kotlinVersion?.let { " data-kotlin-version=\"$it\"" } ?: "" |