aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Markdown
diff options
context:
space:
mode:
authorAlex Waters <awaters@nextfaze.com>2017-05-01 14:00:31 +0930
committerSimon Ogorodnik <sem-oro@yandex.ru>2017-05-04 14:26:37 +0300
commitc2afb348bb0d3dd60d336aa312b5fcedfb31b966 (patch)
tree7071aebbdb30b82532bcdce545edc27d2d3eb4a5 /core/src/main/kotlin/Markdown
parent54c3c87acfb31afc22afc5f20229384f755b677f (diff)
downloaddokka-c2afb348bb0d3dd60d336aa312b5fcedfb31b966.tar.gz
dokka-c2afb348bb0d3dd60d336aa312b5fcedfb31b966.tar.bz2
dokka-c2afb348bb0d3dd60d336aa312b5fcedfb31b966.zip
Fix Markdown list spacing, ordering, and erroneous new lines
Diffstat (limited to 'core/src/main/kotlin/Markdown')
-rw-r--r--core/src/main/kotlin/Markdown/MarkdownProcessor.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Markdown/MarkdownProcessor.kt b/core/src/main/kotlin/Markdown/MarkdownProcessor.kt
index d1d40dd4..2c8f7a73 100644
--- a/core/src/main/kotlin/Markdown/MarkdownProcessor.kt
+++ b/core/src/main/kotlin/Markdown/MarkdownProcessor.kt
@@ -14,6 +14,8 @@ class MarkdownNode(val node: ASTNode, val parent: MarkdownNode?, val markdown: S
val text: String get() = node.getTextInNode(markdown).toString()
fun child(type: IElementType): MarkdownNode? = children.firstOrNull { it.type == type }
+ val previous get() = parent?.children?.getOrNull(parent.children.indexOf(this) - 1)
+
override fun toString(): String = StringBuilder().apply { presentTo(this) }.toString()
}