Imran/Malic
03/17/2019, 12:18 PMraulraja
03/17/2019, 12:24 PMImran/Malic
03/17/2019, 12:27 PMkotlin
const val AnkBlock = ":ank"
const val AnkSilentBlock = ":ank:silent"
const val AnkReplaceBlock = ":ank:replace"
const val AnkOutFileBlock = ":ank:outFile"
const val AnkPlayground = ":ank:playground"
const val AnkFailBlock = ":ank:fail"
const val AnkPlaygroundExtension = ":ank:playground:extension"
markdown
kotlin:ank -> executes the snippet
kotlin:ank:silent -> does not display the output of the snippet
kotlin:ank:replace -> replaces the current snippet with its output
kotlin:ank:fail -> this snippet will pass the gradle task and the stacktrace is displayable
kotlin:ank:playground ->(
with //sampleStart and //sampleEnd one specifies the displayable field.
The rest can be expanded by the viewer:
).`example`{
```kotlin:ank:playground
//sampleStart
fun helloWorld(): String = "Hello World"
//sampleEnd
fun main() {
println(helloWorld())
}
}
kotlinankoutFile ??
kotlinankplayground:extension ??
```raulraja
03/17/2019, 8:00 PMImran/Malic
03/18/2019, 6:35 AMraulraja
03/18/2019, 9:54 AMImran/Malic
03/18/2019, 10:05 PM