From cb6928f9b823c7fde746f17da4834431de452c83 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 22 Jun 2017 19:42:12 +0300 Subject: Wrap parameters in paragraphs for HTML format #171 fixed --- core/src/main/kotlin/Formats/HtmlFormatService.kt | 2 +- core/testdata/format/overloadsWithDescription.html | 4 ++-- core/testdata/format/overloadsWithDifferentDescriptions.html | 9 +++++---- core/testdata/format/parameterAnchor.html | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/src/main/kotlin/Formats/HtmlFormatService.kt b/core/src/main/kotlin/Formats/HtmlFormatService.kt index b6672434..5e05f51a 100644 --- a/core/src/main/kotlin/Formats/HtmlFormatService.kt +++ b/core/src/main/kotlin/Formats/HtmlFormatService.kt @@ -46,7 +46,7 @@ open class HtmlOutputBuilder(to: StringBuilder, override fun appendParagraph(body: () -> Unit) = wrapInTag("p", body, newlineBeforeOpen = true, newlineAfterClose = true) - override fun appendSoftParagraph(body: () -> Unit) = body() + override fun appendSoftParagraph(body: () -> Unit) = appendParagraph(body) override fun appendLine() { to.appendln("
") diff --git a/core/testdata/format/overloadsWithDescription.html b/core/testdata/format/overloadsWithDescription.html index eefa6976..fe98b8fe 100644 --- a/core/testdata/format/overloadsWithDescription.html +++ b/core/testdata/format/overloadsWithDescription.html @@ -14,7 +14,7 @@

Performs an action on x.

This is a long description.

Parameters

- -x - the value to perform the action on. +

+x - the value to perform the action on.

diff --git a/core/testdata/format/overloadsWithDifferentDescriptions.html b/core/testdata/format/overloadsWithDifferentDescriptions.html index cdf380be..1f086039 100644 --- a/core/testdata/format/overloadsWithDifferentDescriptions.html +++ b/core/testdata/format/overloadsWithDifferentDescriptions.html @@ -12,13 +12,14 @@

Performs an action on x.

This is a long description.

Parameters

- -x - the int value to perform the action on. +

+x - the int value to perform the action on.

+ fun f(x: String): Unit

Performs an action on x.

This is a long description.

Parameters

- -x - the string value to perform the action on. +

+x - the string value to perform the action on.

diff --git a/core/testdata/format/parameterAnchor.html b/core/testdata/format/parameterAnchor.html index aa51fff6..ecb89fe6 100644 --- a/core/testdata/format/parameterAnchor.html +++ b/core/testdata/format/parameterAnchor.html @@ -11,7 +11,7 @@ fun <T> processFiles(processor: () -> T): List<T>

Runs processor for each file and collects its results into single list

Parameters

- -processor - function to receive context for symbol resolution and file for processing +

+processor - function to receive context for symbol resolution and file for processing

-- cgit