aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKrystianUjma <kujma@virtuslab.com>2019-06-25 13:12:24 +0200
committerKrystianUjma <kujma@virtuslab.com>2019-06-25 13:12:24 +0200
commit72b45b70f207e8d289db1ee6554722472b7430e7 (patch)
treed32d3d26bcf3149cd6fb86a79605825ce68e35dd /core
parent2b7c9e0a4185e199ffc6aa0f8f1437f08320d30b (diff)
downloaddokka-72b45b70f207e8d289db1ee6554722472b7430e7.tar.gz
dokka-72b45b70f207e8d289db1ee6554722472b7430e7.tar.bz2
dokka-72b45b70f207e8d289db1ee6554722472b7430e7.zip
fix *.dataTags tests
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt6
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt8
-rw-r--r--core/testdata/format/website-html/dataTags/multiplatform.package.html24
3 files changed, 29 insertions, 9 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
index 86bc9df9..3cdea156 100644
--- a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
+++ b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
@@ -35,6 +35,12 @@ open class KotlinWebsiteHtmlOutputBuilder(
}
}
+ override fun appendSinceKotlin(version: String) {
+ }
+
+ override fun appendSinceKotlinWrapped(version: String) {
+ }
+
override fun appendCode(body: () -> Unit) = wrapIfNotEmpty("<code>", "</code>", body)
protected fun div(to: StringBuilder, cssClass: String, otherAttributes: String = "", block: () -> Unit) {
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 62ea1108..7299670e 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -114,6 +114,12 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
appendCode { appendText(version) }
}
+ open fun appendSinceKotlinWrapped(version: String) {
+ wrap(" (", ")") {
+ appendSinceKotlin(version)
+ }
+ }
+
open fun appendSectionWithTag(section: ContentSection) {
appendParagraph {
appendStrong { appendText(section.tag) }
@@ -776,7 +782,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
}
if (membersList.singleOrNull()?.sinceKotlin != null){
- wrap(" (", ")"){ appendSinceKotlin(membersList.single().sinceKotlin.toString()) }
+ appendSinceKotlinWrapped(membersList.single().sinceKotlin.toString())
}
// }
// if (members.singleOrNull()?.kind != NodeKind.ExternalClass) {
diff --git a/core/testdata/format/website-html/dataTags/multiplatform.package.html b/core/testdata/format/website-html/dataTags/multiplatform.package.html
index 4806f9d1..99f0b7a2 100644
--- a/core/testdata/format/website-html/dataTags/multiplatform.package.html
+++ b/core/testdata/format/website-html/dataTags/multiplatform.package.html
@@ -6,7 +6,8 @@
<div class="tags__tag platform tag-value-JRE7" data-tag-version="1.0">JRE7</div>
<div class="tags__tag kotlin-version">1.0</div>
</div>
-<a href="jre7.html">jre7</a><div class="summary-group" data-platform="JVM, JRE7" data-kotlin-version="1.0, 1.0"><div data-platform="JVM, JRE7" data-kotlin-version="1.0, 1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jre7</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="jre7.html">jre7</a></h4>
+<div class="summary-group" data-platform="JVM, JRE7" data-kotlin-version="1.0, 1.0"><div data-platform="JVM, JRE7" data-kotlin-version="1.0, 1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jre7</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JVM, JRE7" data-kotlin-version="1.1, 1.1"><div class="tags"><div class="spacer"></div>
@@ -14,35 +15,40 @@
<div class="tags__tag platform tag-value-JRE7" data-tag-version="1.1">JRE7</div>
<div class="tags__tag kotlin-version">1.1</div>
</div>
-<a href="jre7-new.html">jre7New</a> (Since: <code>1.1</code>)<div class="summary-group" data-platform="JVM, JRE7" data-kotlin-version="1.1, 1.1"><div data-platform="JVM, JRE7" data-kotlin-version="1.1, 1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jre7New</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="jre7-new.html">jre7New</a></h4>
+<div class="summary-group" data-platform="JVM, JRE7" data-kotlin-version="1.1, 1.1"><div data-platform="JVM, JRE7" data-kotlin-version="1.1, 1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jre7New</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JS" data-kotlin-version="1.0"><div class="tags"><div class="spacer"></div>
<div class="tags__tag platform tag-value-JS" data-tag-version="1.0">JS</div>
<div class="tags__tag kotlin-version">1.0</div>
</div>
-<a href="js.html">js</a><div class="summary-group" data-platform="JS" data-kotlin-version="1.0"><div data-platform="JS" data-kotlin-version="1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">js</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="js.html">js</a></h4>
+<div class="summary-group" data-platform="JS" data-kotlin-version="1.0"><div data-platform="JS" data-kotlin-version="1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">js</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JS" data-kotlin-version="1.1"><div class="tags"><div class="spacer"></div>
<div class="tags__tag platform tag-value-JS" data-tag-version="1.1">JS</div>
<div class="tags__tag kotlin-version">1.1</div>
</div>
-<a href="js-new.html">jsNew</a> (Since: <code>1.1</code>)<div class="summary-group" data-platform="JS" data-kotlin-version="1.1"><div data-platform="JS" data-kotlin-version="1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jsNew</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="js-new.html">jsNew</a></h4>
+<div class="summary-group" data-platform="JS" data-kotlin-version="1.1"><div data-platform="JS" data-kotlin-version="1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jsNew</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JVM" data-kotlin-version="1.0"><div class="tags"><div class="spacer"></div>
<div class="tags__tag platform tag-value-JVM" data-tag-version="1.0">JVM</div>
<div class="tags__tag kotlin-version">1.0</div>
</div>
-<a href="jvm.html">jvm</a><div class="summary-group" data-platform="JVM" data-kotlin-version="1.0"><div data-platform="JVM" data-kotlin-version="1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jvm</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="jvm.html">jvm</a></h4>
+<div class="summary-group" data-platform="JVM" data-kotlin-version="1.0"><div data-platform="JVM" data-kotlin-version="1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jvm</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JVM" data-kotlin-version="1.1"><div class="tags"><div class="spacer"></div>
<div class="tags__tag platform tag-value-JVM" data-tag-version="1.1">JVM</div>
<div class="tags__tag kotlin-version">1.1</div>
</div>
-<a href="jvm-new.html">jvmNew</a> (Since: <code>1.1</code>)<div class="summary-group" data-platform="JVM" data-kotlin-version="1.1"><div data-platform="JVM" data-kotlin-version="1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jvmNew</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="jvm-new.html">jvmNew</a></h4>
+<div class="summary-group" data-platform="JVM" data-kotlin-version="1.1"><div data-platform="JVM" data-kotlin-version="1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">jvmNew</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JVM, JS, JRE7" data-kotlin-version="1.0, 1.0, 1.0"><div class="tags"><div class="spacer"></div>
@@ -51,7 +57,8 @@
<div class="tags__tag platform tag-value-JS" data-tag-version="1.0">JS</div>
<div class="tags__tag kotlin-version">1.0</div>
</div>
-<a href="shared.html">shared</a><div class="summary-group" data-platform="JVM, JS, JRE7" data-kotlin-version="1.0, 1.0, 1.0"><div data-platform="JVM, JS, JRE7" data-kotlin-version="1.0, 1.0, 1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">shared</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="shared.html">shared</a></h4>
+<div class="summary-group" data-platform="JVM, JS, JRE7" data-kotlin-version="1.0, 1.0, 1.0"><div data-platform="JVM, JS, JRE7" data-kotlin-version="1.0, 1.0, 1.0"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">shared</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
<div class="declarations" data-platform="JVM, JS, JRE7" data-kotlin-version="1.1, 1.1, 1.1"><div class="tags"><div class="spacer"></div>
@@ -60,7 +67,8 @@
<div class="tags__tag platform tag-value-JS" data-tag-version="1.1">JS</div>
<div class="tags__tag kotlin-version">1.1</div>
</div>
-<a href="shared-new.html">sharedNew</a> (Since: <code>1.1</code>)<div class="summary-group" data-platform="JVM, JS, JRE7" data-kotlin-version="1.1, 1.1, 1.1"><div data-platform="JVM, JS, JRE7" data-kotlin-version="1.1, 1.1, 1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">sharedNew</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
+<h4><a href="shared-new.html">sharedNew</a></h4>
+<div class="summary-group" data-platform="JVM, JS, JRE7" data-kotlin-version="1.1, 1.1, 1.1"><div data-platform="JVM, JS, JRE7" data-kotlin-version="1.1, 1.1, 1.1"><div class="signature"><code><span class="keyword">fun </span><span class="identifier">sharedNew</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
</div></div>
</div>
</div>