Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion docs/03/00.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Dollar signs can be escaped to avoid resolution:
```
val foo = "foo"
val bar = "bar"
println(s"\\$foo\\$bar")
println(s"\\\$foo\\\$bar")
```

This would yield to:
Expand All @@ -105,6 +105,31 @@ val bar = "bar"
println(s"\$foo\$bar")
```

### Template comments

Sometimes it's useful to put a comment into a template that is intended for
template maintainers, and should not be included in the generated output.

Wrapping comments between `\$!` and `!\$` won't make them appear in the output.

```
\$! This comment won't appear in the output !\$
// This comment will appear in the output
\$!
This multiline comment won't appear either
No matter how
long it is

Internal \$substitutions\$ are ignored.

Even \$invalid\$ ones.

!\$
/*
* This comment is output and can contain \$substitutions\$
*/
```

### Conditionals

All fields have a property named `truthy` to be used in [conditional expressions][conditionals].
Expand Down