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/Formats | |
parent | 36a96fb39589c13ec7062e70bc71279a20b446a0 (diff) | |
download | dokka-e93b629e4b2fa70330d94b8cb77f3ae34d1a9960.tar.gz dokka-e93b629e4b2fa70330d94b8cb77f3ae34d1a9960.tar.bz2 dokka-e93b629e4b2fa70330d94b8cb77f3ae34d1a9960.zip |
Fix rendering
Diffstat (limited to 'src/Formats')
-rw-r--r-- | src/Formats/StructuredFormatService.kt | 12 |
1 files changed, 5 insertions, 7 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() } |