LYR-LEX0014
a multi-line string whose quotes do not stand on lines of their own
A multi-line string """…""" has text on the line of its opening """, or text before its closing """ on the closing line.
Explanation
The text of a multi-line string begins on the line after the opening """ and ends on the line before the closing one; the closing line holds only the indentation that is taken off every line.
Break the line after the opening """, and put the closing """ on a line of its own.
Wrong
fn main(): void {
let text = """first
""";
let _ = text;
}
Right
fn main(): void {
let text = """
first
""";
let _ = text;
}