aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Formats/StructuredFormatService.kt12
-rw-r--r--src/Kotlin/DocumentationContext.kt2
2 files changed, 6 insertions, 8 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index b1e614f6..40feaf21 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -32,14 +32,12 @@ public abstract class StructuredFormatService(val locationService: LocationServi
return nodes.map { formatText(it) }.join("")
}
- open fun formatText(text: ContentNode): String {
+ open fun formatText(node: ContentNode): String {
return StringBuilder {
- for (node in text.children) {
- when (node) {
- is ContentText -> append(node.text)
- is ContentEmphasis -> append(formatBold(formatText(node.children)))
- else -> append(formatText(node.children))
- }
+ when (node) {
+ is ContentText -> append(node.text)
+ is ContentEmphasis -> append(formatBold(formatText(node.children)))
+ else -> append(formatText(node.children))
}
}.toString()
}
diff --git a/src/Kotlin/DocumentationContext.kt b/src/Kotlin/DocumentationContext.kt
index 1491aa2d..ec9e748f 100644
--- a/src/Kotlin/DocumentationContext.kt
+++ b/src/Kotlin/DocumentationContext.kt
@@ -23,7 +23,7 @@ public class DocumentationContext(val bindingContext: BindingContext) {
fun parseDocumentation(descriptor: DeclarationDescriptor): Content {
val docText = bindingContext.getDocumentationElements(descriptor).map { it.extractText() }.join("\n")
val tree = MarkdownProcessor.parse(docText)
- println(tree.toTestString())
+ //println(tree.toTestString())
val content = tree.toContent()
return content
}