This release has a few more examples.
The main new feature is the ability to specify multiline strings more easily, i.e. instead of the ugly
{
foo: "!/bin/bash
echo \"Hello world!\"",
}
or the bureaucratic
{
foo: std.lines([
"!/bin/bash"
"echo \"Hello world!\"",
])
}
you can now do the following, which is similar to the YAML "block style" construct.
{
foo: |||
!/bin/bash
echo "Hello world!"
|||,
}
The indentation is stripped.
Note that this is just a string literal, so it can be combined with % to do string templating:
{
foo: |||
!/bin/bash
echo "Hello %(greetable_entity)s!"
||| % {
greetable_entity: "world"
},
}