roc
roc copied to clipboard
Syntactically invalid REPL output when answer is multiline string
Here's what happens if I put "foo\nbar" into the REPL:
» "foo\nbar"
"foo
bar" : Str
That answer is syntactically invalid!
Instead, whenever we're about to print a string literal containing one or more newline characters, we should print it with triple-quoted strings, like so:
» "foo\nbar"
"""
foo
bar
""" : Str