-
-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Labels
Description
Description
When there is nothing before the antiquotation marker ${ (i.e. only string context indent), multi-line constructs are absorbed right behind the antiquotation marker as expected. When there is any string before the marker though, nothing is absorbed.
Repro'd on 923d379.
Small example input
''
${somefunc { multiple = true; attrs = false; }}
short ${somefunc { multiple = true; attrs = false; }}
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong ${somefunc { multiple = true; attrs = false; }}
''Expected output
''
${somefunc {
multiple = true;
attrs = false;
}}
short ${somefunc {
multiple = true;
attrs = false;
}}
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong ${somefunc {
multiple = true;
attrs = false;
}}
''Or perhaps do wrap with the long prefix.
Perhaps splitting across lines should be a little less eager in string interpolations to begin with though so that the first two are just a single line unless that line becomes too long. There usually isn't the same expectation for many more elements to be added inside of an interpolation and it's usually worth the potential diff noise IMHO.
This would be ideal IMHO:
''
${somefunc { multiple = true; attrs = false; }}
short ${somefunc { multiple = true; attrs = false; }}
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong ${
somefunc {
multiple = true;
attrs = false;
}
}
''Actual output
''
${somefunc {
multiple = true;
attrs = false;
}}
short ${
somefunc {
multiple = true;
attrs = false;
}
}
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong ${
somefunc {
multiple = true;
attrs = false;
}
}
''Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
Status
Done