generated from rnentjes/kotlin-server-web-empty
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user