diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-09-29 22:29:41 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-09-29 22:29:41 +0400 |
commit | e93b629e4b2fa70330d94b8cb77f3ae34d1a9960 (patch) | |
tree | af8e1b3e1cdc43720e7f880ad2e82ae3cc8d4e28 /src | |
parent | 36a96fb39589c13ec7062e70bc71279a20b446a0 (diff) | |
download | dokka-e93b629e4b2fa70330d94b8cb77f3ae34d1a9960.tar.gz dokka-e93b629e4b2fa70330d94b8cb77f3ae34d1a9960.tar.bz2 dokka-e93b629e4b2fa70330d94b8cb77f3ae34d1a9960.zip |
Fix rendering
Diffstat (limited to 'src')
-rw-r--r-- | src/Formats/StructuredFormatService.kt | 12 | ||||
-rw-r--r-- | src/Kotlin/DocumentationContext.kt | 2 |
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 } |