aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-09-26 22:15:03 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-09-26 22:15:03 +0300
commit960e022f7b94d858942f938dd9f7b877f2435964 (patch)
tree43c98182fa42513525f4e2875c2b2bb26ab93175 /core/src
parentcffc71e39f20a368f2ffe10bf0c8aa4432dee7fc (diff)
downloaddokka-960e022f7b94d858942f938dd9f7b877f2435964.tar.gz
dokka-960e022f7b94d858942f938dd9f7b877f2435964.tar.bz2
dokka-960e022f7b94d858942f938dd9f7b877f2435964.zip
Take implied platforms back
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt7
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\"" } ?: ""