Open robinheghan opened 1 year ago
Worked on by @Gauteab
The syntax would still be unambiguous if we use only a single "
instead of three, so
text =
"
First
Second
"
instead of
text =
"""
First
Second
"""
Would this be more confusing than nice? I feel like it would be easier to learn/remember. Changing from single-line to multi-line string would also be more seamless.
Discovered this current behavior when trying to test terminal output in gren-tui:
> """
| indented
| not indented
| """
|
"indented\nnot indented" : String
I guess that would be fixed by this?
Only the line containing the closing """ should determine the indentation level to be removed.
Until this is done should this be labelled as a bug? Kind of makes multi-line strings unusable in places with Very Significant whitespace.
Yes, this is a bug.
"""
should determine the indentation level to be removed.\n
it should be a syntax error (The empty string,""""""
, is not valid)"""
should have the same indentation level.