diff options
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 8 | ||||
-rw-r--r-- | core/testdata/format/paramTag.md | 1 | ||||
-rw-r--r-- | core/testdata/format/throwsTag.md | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index d830fda7..1d464396 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -254,9 +254,17 @@ abstract class StructuredFormatService(locationService: LocationService, fun appendSectionWithSubject(title: String, subjectSections: List<ContentSection>) { appendHeader(to, title, 3) + var first: Boolean = true subjectSections.forEach { val subjectName = it.subjectName if (subjectName != null) { + if (first) { + first = false + } + else { + appendLine(to) + } + appendAnchor(to, subjectName) to.append(formatCode(subjectName)).append(" - ") formatText(location, it, to) diff --git a/core/testdata/format/paramTag.md b/core/testdata/format/paramTag.md index 882083fe..20d8faac 100644 --- a/core/testdata/format/paramTag.md +++ b/core/testdata/format/paramTag.md @@ -8,6 +8,7 @@ ### Parameters `x` - A string + `y` - A number with a really long description that spans multiple lines and goes on and on and is very interesting to read diff --git a/core/testdata/format/throwsTag.md b/core/testdata/format/throwsTag.md index d0a4e610..21225297 100644 --- a/core/testdata/format/throwsTag.md +++ b/core/testdata/format/throwsTag.md @@ -8,6 +8,7 @@ ### Exceptions `IllegalArgumentException` - on Mondays + `NullPointerException` - on Tuesdays |