generated from rnentjes/kotlin-server-web-empty
Add tests for nested unordered and checkbox lists, extend parser for indentation handling, and bump version to 2.0.0
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
package nl.astraeus.markdown.parser
|
||||
|
||||
data class ListItem(
|
||||
val text: String,
|
||||
val order: Int,
|
||||
val indentation: Int = 0
|
||||
)
|
||||
|
||||
data class CheckboxItem(
|
||||
val line: Int,
|
||||
val checked: Boolean,
|
||||
val text: String,
|
||||
val indentation: Int = 0
|
||||
)
|
||||
|
||||
sealed class MarkdownPart {
|
||||
@@ -66,7 +73,7 @@ sealed class MarkdownPart {
|
||||
) : MarkdownPart()
|
||||
|
||||
data class UnorderedList(
|
||||
val lines: List<Pair<Int, String>>,
|
||||
val lines: List<ListItem>,
|
||||
) : MarkdownPart()
|
||||
|
||||
data class CheckboxList(
|
||||
@@ -74,7 +81,7 @@ sealed class MarkdownPart {
|
||||
) : MarkdownPart()
|
||||
|
||||
data class OrderedList(
|
||||
val lines: List<String>,
|
||||
val lines: List<ListItem>,
|
||||
) : MarkdownPart()
|
||||
|
||||
data class CodeBlock(
|
||||
|
||||
Reference in New Issue
Block a user