Grav removes Strings in <> in code

Hi.
I want to use the Kotlin Playground on my site. But I have a problem with Kotlin code in <> because it gets stripped out.

For example the file with content:

gets translated into:

object HandshakeCalculator {
fun calculateHandshake(number: Int): List {
val binaryToSignal = Signal.values().asList()
val binaryString = number.toString(2)
var result = mutableListOf()
binaryString.reversed().forEachIndexed { index, item ->
if (item == ‘1’) {
if (index < binaryToSignal.size) {
result.add(binaryToSignal[index])
}
}
}
return if (binaryString.reversed().getOrNull(4) == ‘1’) result.reversed() else result
}
}

-> The <Signal> String is removed. How can I teach Grav that it handles the code as it is and does NOT filter anything in it?

Inserting Javascript code in the page content is not allowed by Grav.

The easiest way is to use the Assets Plugin. You’ll find it in the Grav Plugins Download section of the Grav website. Or if you are using the Admin Plugin you can add that plugin by clicking the Add button under Plugins in the Admin panel.

Once installed you can add the external Javascript file like this:

{assets:js order:10}
https://unpkg.com/kotlin-playground...
{/assets}

and your Javascript code inline as you tried but then like this:

{assets:inline_js}
object HandshakeCalculator {
      fun... 
{/assets}

If you want to understand how to use assets like Javascript code and CSS stylesheets in theme templates and without using the Assets Plugin, you’ll want to read the docs about Themes and specifically about Adding Assets.

I hope this helps.