generated from rnentjes/kotlin-server-web-empty
Fix checkbox list parsing error, and update version to 1.0.5
This commit is contained in:
@@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "nl.astraeus"
|
group = "nl.astraeus"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -28,10 +28,7 @@ kotlin {
|
|||||||
browser {}
|
browser {}
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
val commonMain by getting {
|
val commonMain by getting
|
||||||
dependencies {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val commonTest by getting {
|
val commonTest by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("test"))
|
implementation(kotlin("test"))
|
||||||
|
|||||||
@@ -182,7 +182,11 @@ fun markdown(text: String): List<MarkdownPart> {
|
|||||||
index++
|
index++
|
||||||
}
|
}
|
||||||
|
|
||||||
parseBuffer()
|
if (type == MarkdownType.CHECKBOX_LIST) {
|
||||||
|
parts.add(MarkdownPart.CheckboxList(checkboxList))
|
||||||
|
} else {
|
||||||
|
parseBuffer()
|
||||||
|
}
|
||||||
|
|
||||||
return parts
|
return parts
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,19 @@ class ParseTest {
|
|||||||
printMarkdownParts(md)
|
printMarkdownParts(md)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testCheckboxListError() {
|
||||||
|
val input = """
|
||||||
|
Dit is een text
|
||||||
|
|
||||||
|
- [ ] Not checked
|
||||||
|
- [x] Checked""".trimIndent()
|
||||||
|
|
||||||
|
val md = markdown(input)
|
||||||
|
|
||||||
|
printMarkdownParts(md)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testHeading() {
|
fun testHeading() {
|
||||||
val input = "# Markdown\n\nMy **markdown** text."
|
val input = "# Markdown\n\nMy **markdown** text."
|
||||||
|
|||||||
Reference in New Issue
Block a user