diff options
Diffstat (limited to 'src/Model')
-rw-r--r-- | src/Model/DocumentationContent.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Model/DocumentationContent.kt b/src/Model/DocumentationContent.kt index d3826434..ed81b9e9 100644 --- a/src/Model/DocumentationContent.kt +++ b/src/Model/DocumentationContent.kt @@ -9,7 +9,7 @@ class DocumentationContentSection(val label: String, val text: String) { } } -class DocumentationContent(val summary: String, val sections: List<DocumentationContentSection>) { +class DocumentationContent(val summary: String, val description: String, val sections: List<DocumentationContentSection>) { override fun equals(other: Any?): Boolean { if (other !is DocumentationContent) @@ -36,17 +36,16 @@ class DocumentationContent(val summary: String, val sections: List<Documentation } class object { - val Empty = DocumentationContent("", listOf()) + val Empty = DocumentationContent("", "", listOf()) } } fun BindingContext.getDocumentation(descriptor: DeclarationDescriptor): DocumentationContent { val docText = getDocumentationElements(descriptor).map { it.extractText() }.join("\n") - val sections = docText.parseSections() - - return DocumentationContent(sections.first().text, sections.drop(1)) + val content = sections.first().text + return DocumentationContent(content.substringBefore('\n'), content.substringAfter('\n'), sections.drop(1)) } fun String.parseLabel(index: Int): Pair<String, Int> { |