haxe-formatter
haxe-formatter copied to clipboard
Wrapping with assignment of multi-line string literal
I feel like if there's an empty after a multi-line string assignment, it should be kept:
class Main {
static function main() {
var whileBackward =
'var i = $field;
while (i-- > 0) {
$0
}';
}
}
Removing it makes it look much worse:
class Main {
static function main() {
var whileBackward = 'var i = $field;
while (i-- > 0) {
$0
}';
}
}
Doesn't necessarily have to be a var assignment, could also appear in other value places:
class Main {
static function main() {
{
foo:
'var i = $field;
while (i-- > 0) {
$0
}'
}
}
}
keeping the line break before multi line strings is doable, but currently that would lead to indentation of its first line, which is probably not much better.
Hm, yeah, that doesn't seem like a good idea.