kotlinx-knit
kotlinx-knit copied to clipboard
Support sample file templates
Currently, in knit.properties
you can only configure a section of the code that is included before the example. You cannot configure the large scaffolding, so it has to be provided in the source when needed, like this:
<!--- INCLUDE .*
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*
fun main() = runBlocking {
----- SUFFIX .*
.toList().joinToString().let { println(it) } }
-->
We need to support the configuration of this kind of scaffolding with prefix and suffix around example code via a properties file.