Formatter: fix indent for multiline expression in string template

#KT-35359 Fixed
This commit is contained in:
Dmitry Gridin
2020-04-09 23:51:59 +07:00
parent decbe99391
commit 585177bcf7
17 changed files with 112 additions and 9 deletions
+8
View File
@@ -0,0 +1,8 @@
fun test() {
val message1 = "${
"sd"
}"
val message2 = {
"sd"
}()
}
+8
View File
@@ -0,0 +1,8 @@
fun test() {
val message1 = "${
"sd"
}"
val message2 = {
"sd"
}()
}
@@ -0,0 +1,4 @@
fun test() {
val message1 = "${"sd"}"
val message2 = { "sd" }()
}
+4
View File
@@ -0,0 +1,4 @@
fun test() {
val message1 = "${"sd"}"
val message2 = {"sd"}()
}
@@ -0,0 +1,3 @@
val message = "${
"sd"
}"
+2
View File
@@ -0,0 +1,2 @@
val message = "${"sd"
}"
@@ -0,0 +1,5 @@
fun test() {
val message = "start ${
"sd"
} end"
}
+4
View File
@@ -0,0 +1,4 @@
fun test() {
val message = "start ${
"sd"} end"
}
@@ -0,0 +1,5 @@
fun test() {
"start ${
println("sd")
} end"
}
+4
View File
@@ -0,0 +1,4 @@
fun test() {
"start ${
println("sd")} end"
}
@@ -0,0 +1,7 @@
fun test() {
"start ${
println(
"sd"
)
} end"
}
+5
View File
@@ -0,0 +1,5 @@
fun test() {
"start ${println(
"sd"
)} end"
}
@@ -1,2 +1,4 @@
val v = "${2 +
2}"
val v = "${
2 +
2
}"
@@ -1,4 +1,6 @@
fun foo() {
val y = "x=${"""ab
c"""}"
val y = "x=${
"""ab
c"""
}"
}