aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-04-25 18:18:19 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-04-25 18:18:19 +0300
commitb697931315234ca74767ce26e2e9b03b46e4ad21 (patch)
tree5fdad533d769d0ea409a3d4104d6831d1698878b
parent5cd5ec6904fadb3e420d548dfd987dd32cc24959 (diff)
downloaddokka-b697931315234ca74767ce26e2e9b03b46e4ad21.tar.gz
dokka-b697931315234ca74767ce26e2e9b03b46e4ad21.tar.bz2
dokka-b697931315234ca74767ce26e2e9b03b46e4ad21.zip
Fix <String> escaping in samples for KWS HTML format
-rw-r--r--core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt2
-rw-r--r--core/testdata/format/website-html/dropImport.html2
-rw-r--r--core/testdata/format/website-html/newLinesInImportList.html2
-rw-r--r--core/testdata/format/website-html/newLinesInSamples.html2
-rw-r--r--core/testdata/format/website-html/sample.html2
-rw-r--r--core/testdata/format/website-html/sampleWithAsserts.html2
6 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
index 0d8b10bb..378401f3 100644
--- a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
+++ b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
@@ -150,7 +150,7 @@ open class KotlinWebsiteHtmlOutputBuilder(to: StringBuilder,
div(to, "sample") {
appendBlockCode(language) {
imports()
- wrap("\n\nfun main(args: Array<String>) {", "}") {
+ wrap("\n\nfun main(args: Array<String>) {".htmlEscape(), "}") {
wrap("\n//sampleStart\n", "\n//sampleEnd\n", body)
}
}
diff --git a/core/testdata/format/website-html/dropImport.html b/core/testdata/format/website-html/dropImport.html
index cfcb8cd5..97ff4a68 100644
--- a/core/testdata/format/website-html/dropImport.html
+++ b/core/testdata/format/website-html/dropImport.html
@@ -4,7 +4,7 @@
<div class="signature"><code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
<div class="sample"><pre><code class="lang-kotlin">import some.*
-fun main(args: Array<String>) {
+fun main(args: Array&lt;String&gt;) {
//sampleStart
//sampleEnd
diff --git a/core/testdata/format/website-html/newLinesInImportList.html b/core/testdata/format/website-html/newLinesInImportList.html
index 4862b314..334ed11c 100644
--- a/core/testdata/format/website-html/newLinesInImportList.html
+++ b/core/testdata/format/website-html/newLinesInImportList.html
@@ -5,7 +5,7 @@
<div class="sample"><pre><code class="lang-kotlin">import same.*
import some.*
-fun main(args: Array<String>) {
+fun main(args: Array&lt;String&gt;) {
//sampleStart
//sampleEnd
diff --git a/core/testdata/format/website-html/newLinesInSamples.html b/core/testdata/format/website-html/newLinesInSamples.html
index 0babe122..ab70140d 100644
--- a/core/testdata/format/website-html/newLinesInSamples.html
+++ b/core/testdata/format/website-html/newLinesInSamples.html
@@ -4,7 +4,7 @@
<div class="signature"><code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></div>
<div class="sample"><pre><code class="lang-kotlin">
-fun main(args: Array<String>) {
+fun main(args: Array&lt;String&gt;) {
//sampleStart
val words = listOf("a", "abc", "ab", "def", "abcd")
val byLength = words.groupBy { it.length }
diff --git a/core/testdata/format/website-html/sample.html b/core/testdata/format/website-html/sample.html
index 55d321c0..d709edc4 100644
--- a/core/testdata/format/website-html/sample.html
+++ b/core/testdata/format/website-html/sample.html
@@ -6,7 +6,7 @@
applied to each element and returns a map where each group key is associated with a list of corresponding elements.</p>
<div class="sample"><pre><code class="lang-kotlin">
-fun main(args: Array<String>) {
+fun main(args: Array&lt;String&gt;) {
//sampleStart
if (true) {
println(property)
diff --git a/core/testdata/format/website-html/sampleWithAsserts.html b/core/testdata/format/website-html/sampleWithAsserts.html
index 7d014dbb..e70d37c9 100644
--- a/core/testdata/format/website-html/sampleWithAsserts.html
+++ b/core/testdata/format/website-html/sampleWithAsserts.html
@@ -5,7 +5,7 @@
<div class="sample"><pre><code class="lang-kotlin">import java.io.FileNotFoundException
import java.io.File
-fun main(args: Array<String>) {
+fun main(args: Array&lt;String&gt;) {
//sampleStart
println(a()) // Hello, Work
println("a() == b() is ${a() == b()}") // true