kotlinx-knit icon indicating copy to clipboard operation
kotlinx-knit copied to clipboard

Support sample file templates

Open elizarov opened this issue 4 years ago • 0 comments

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.

elizarov avatar Oct 08 '20 13:10 elizarov