From 68318a6e3960ffb965b77ca66e9e28ad6ea06442 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 1 Apr 2016 16:30:47 +0200 Subject: KT-11329: improve formatting of KDoc sections --- core/testdata/format/accessor.md | 4 ++++ core/testdata/format/javaSeeTag.html | 4 ++-- core/testdata/format/javaSpaceInAuthor.md | 2 ++ core/testdata/format/see.html | 4 ++-- core/testdata/format/website/returnTag.kt | 11 +++++++++++ core/testdata/format/website/returnTag.md | 25 +++++++++++++++++++++++++ 6 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 core/testdata/format/website/returnTag.kt create mode 100644 core/testdata/format/website/returnTag.md (limited to 'core/testdata/format') diff --git a/core/testdata/format/accessor.md b/core/testdata/format/accessor.md index 8279f452..eb326727 100644 --- a/core/testdata/format/accessor.md +++ b/core/testdata/format/accessor.md @@ -4,11 +4,14 @@ # x `var x: String` + **Getter** The getter returns an empty string. + + **Setter** The setter does nothing. @@ -16,3 +19,4 @@ The setter does nothing. + diff --git a/core/testdata/format/javaSeeTag.html b/core/testdata/format/javaSeeTag.html index e5e17f6d..3269c5a0 100644 --- a/core/testdata/format/javaSeeTag.html +++ b/core/testdata/format/javaSeeTag.html @@ -8,8 +8,8 @@

Foo

open class Foo

-See Also
-#bar
+

See Also
+#bar



Constructors

diff --git a/core/testdata/format/javaSpaceInAuthor.md b/core/testdata/format/javaSpaceInAuthor.md index 4d19ed01..e464f0a0 100644 --- a/core/testdata/format/javaSpaceInAuthor.md +++ b/core/testdata/format/javaSpaceInAuthor.md @@ -7,11 +7,13 @@ + **Author** Dmitry Jemerov + ### Constructors diff --git a/core/testdata/format/see.html b/core/testdata/format/see.html index e5ae4669..e39711bb 100644 --- a/core/testdata/format/see.html +++ b/core/testdata/format/see.html @@ -7,10 +7,10 @@

quux

fun quux(): Unit
-See Also
+

See Also

foo

bar

-
+



test / foo
diff --git a/core/testdata/format/website/returnTag.kt b/core/testdata/format/website/returnTag.kt new file mode 100644 index 00000000..669c14f9 --- /dev/null +++ b/core/testdata/format/website/returnTag.kt @@ -0,0 +1,11 @@ +class Foo + +/** + * Returns the index within this string of the first occurrence of the specified character, starting from the specified [startIndex]. + * + * @param ignoreCase `true` to ignore character case when matching a character. By default `false`. + * @returns An index of the first occurrence of [char] or -1 if none is found. + */ +fun Foo.indexOf(char: Char, startIndex: Int = 0, ignoreCase: Boolean = false): Int { + return -1 +} diff --git a/core/testdata/format/website/returnTag.md b/core/testdata/format/website/returnTag.md new file mode 100644 index 00000000..301635ad --- /dev/null +++ b/core/testdata/format/website/returnTag.md @@ -0,0 +1,25 @@ +--- +title: indexOf - test +layout: api +--- + +
test / indexOf
+ + +# indexOf + +
fun Foo.indexOf(
    char: Char,
    startIndex: Int = 0,
    ignoreCase: Boolean = false
): Int

+
+ +Returns the index within this string of the first occurrence of the specified character, starting from the specified startIndex. + + +### Parameters + +ignoreCase - true to ignore character case when matching a character. By default false. + +**Returns** +An index of the first occurrence of char or -1 if none is found. + + + -- cgit