rascal
rascal copied to clipboard
first line of string template does not indent injected lines.
Describe the bug
rascal>aaa = "a\nb\nc";
str: "a\nb\nc"
rascal>" <aaa>"
str: " a\nb\nc"
rascal>
cancelled
rascal>"
>>>>>>>' <aaa>"
str: "\n a\n b\n c"
- the interpolation on the second line works fine, it adds the two spaces in front of every line
- the interpolation on the first line does nothing
- of course the first line is different from the second line, because we parse the whitespace after the
'to know exactly which whitespace to use, while in the first line after the"anything goes. - fixing this requires some design decisions
This is the workaround:
rascal>"
>>>>>>>' <aaa>"[1..]
str: " a\n b\n c"