https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
i

Imran/Malic

03/17/2019, 12:18 PM
what does this do in ank: kotlinankreplace
r

raulraja

03/17/2019, 12:24 PM
Replaces the current snippet with its output
i

Imran/Malic

03/17/2019, 12:27 PM
Thanks. Are both implementation coherent https://github.com/arrow-kt/ank/blob/master/ank-core/src/main/kotlin/arrow/ank/interpreter.kt https://github.com/arrow-kt/arrow/blob/master/modules/ank/arrow-ank/src/main/kotlin/arrow/ank/interpreter.kt Because I can't see this in the first one:
Copy code
kotlin
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"
Is this right?
Copy code
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 ?? ```
r

raulraja

03/17/2019, 8:00 PM
the ank repo is deprecated
I'm gonna remove it
ank lives now in Arrow until 1.0
just archived the old repo so there is no confusion
i

Imran/Malic

03/18/2019, 6:35 AM
Ok. What does kotlinankoutFile and kotlinankplayground:extension do?
i

Imran/Malic

03/18/2019, 10:05 PM
My Bad 🙂. I did not see that
Thank you
👍 1
6 Views