generated from rnentjes/kotlin-server-web-empty
Add new test for complex checkbox list parsing, update parser to reset checkboxList correctly, and bump version to 1.0.11
This commit is contained in:
@@ -20,7 +20,7 @@ fun markdown(text: String): List<MarkdownPart> {
|
||||
|
||||
var index = 0
|
||||
val buffer = StringBuilder()
|
||||
val checkboxList = mutableListOf<CheckboxItem>()
|
||||
var checkboxList = mutableListOf<CheckboxItem>()
|
||||
|
||||
fun parseBuffer() {
|
||||
if (buffer.isNotBlank()) {
|
||||
@@ -59,7 +59,7 @@ fun markdown(text: String): List<MarkdownPart> {
|
||||
addCheckbox(checkboxList, checkboxLine, buffer)
|
||||
}
|
||||
parts.add(MarkdownPart.CheckboxList(checkboxList))
|
||||
checkboxList.clear()
|
||||
checkboxList = mutableListOf()
|
||||
parseBuffer()
|
||||
continue
|
||||
} else if (line.startsWith("- [ ]") || line.startsWith("- [x]")) {
|
||||
|
||||
Reference in New Issue
Block a user