aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Model/Content.kt
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-05-12 16:35:42 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-05-15 17:54:09 +0300
commitfbfaef6a9abdb6743e7e6f9f9bbe7c72595ce0c2 (patch)
tree8da2c6de1fedf98e7a5781b10202bde602548c55 /core/src/main/kotlin/Model/Content.kt
parent17c87f18f03b2c31b68251b17cbfa2531e0bd63c (diff)
downloaddokka-fbfaef6a9abdb6743e7e6f9f9bbe7c72595ce0c2.tar.gz
dokka-fbfaef6a9abdb6743e7e6f9f9bbe7c72595ce0c2.tar.bz2
dokka-fbfaef6a9abdb6743e7e6f9f9bbe7c72595ce0c2.zip
Fix parsing of line breaks inside javadoc comments
#141 fixed
Diffstat (limited to 'core/src/main/kotlin/Model/Content.kt')
-rw-r--r--core/src/main/kotlin/Model/Content.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Model/Content.kt b/core/src/main/kotlin/Model/Content.kt
index c8585418..1f5bbc83 100644
--- a/core/src/main/kotlin/Model/Content.kt
+++ b/core/src/main/kotlin/Model/Content.kt
@@ -89,6 +89,11 @@ abstract class ContentNodeLink() : ContentBlock() {
abstract val node: DocumentationNode?
}
+object ContentHardLineBreak : ContentNode {
+ override val textLength: Int
+ get() = 0
+}
+
class ContentNodeDirectLink(override val node: DocumentationNode): ContentNodeLink() {
override fun equals(other: Any?): Boolean =
super.equals(other) && other is ContentNodeDirectLink && node.name == other.node.name
@@ -153,6 +158,7 @@ fun ContentBlock.identifier(value: String, kind: IdentifierKind = IdentifierKind
fun ContentBlock.nbsp() = append(ContentNonBreakingSpace)
fun ContentBlock.softLineBreak() = append(ContentSoftLineBreak)
fun ContentBlock.indentedSoftLineBreak() = append(ContentIndentedSoftLineBreak)
+fun ContentBlock.hardLineBreak() = append(ContentHardLineBreak)
fun ContentBlock.strong(body: ContentBlock.() -> Unit) {
val strong = ContentStrong()