Extend list parsing to handle multi-line items, improve checkbox list parsing with edge case handling, add unordered/ordered list tests, and update version to 1.0.6.

This commit is contained in:
2026-01-10 12:37:09 +01:00
parent 11a6f3a57b
commit 7f48f5d5cd
3 changed files with 85 additions and 28 deletions

View File

@@ -50,13 +50,52 @@ class ParseTest {
printMarkdownParts(md)
}
@Test
fun testUnorderedList() {
val input = """
Dit is een text
- First
More text
- Second
More text
Another paragraph
""".trimIndent()
val md = markdown(input)
printMarkdownParts(md)
}
@Test
fun testOrderedList() {
val input = """
Dit is een text
-. First
More text
-. Second
More text
Another paragraph
""".trimIndent()
val md = markdown(input)
printMarkdownParts(md)
}
@Test
fun testCheckboxList() {
val input = """
Dit is een text
- [ ] Not checked
- [x] Checked
- [ ] Not checked,
with some more text here
- [x] Checked!
- [x] Checked,
text it!
Meer text
""".trimIndent()