Escaping quotes in live-templates (KT-2387)

#KT-2387 Fixed
This commit is contained in:
hisaaki.sioiri
2019-02-13 04:56:41 +03:00
committed by Nikolay Krasko
parent 7149d4cd1c
commit f1cc7cecce
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
fun main(args : Array<String>) {
val x = 5
val y = "str"
println("y = ${y}")<caret>
println("y.plus(\"test\") = ${y.plus("test")}")<caret>
}
@@ -80,7 +80,7 @@ class LiveTemplatesTest : KotlinLightCodeInsightFixtureTestCase() {
start()
assertStringItems("DEFAULT_BUFFER_SIZE", "args", "x", "y")
typeAndNextTab("y")
typeAndNextTab("y.plus(\"test\")")
checkAfter()
}
+1 -1
View File
@@ -43,7 +43,7 @@
value="println(&quot;$EXPR_COPY$ = $DOLLAR${$EXPR$}&quot;)">
<variable alwaysStopAt="false" defaultValue="&quot;$&quot;" expression="" name="DOLLAR" />
<variable alwaysStopAt="true" defaultValue="&quot;expr&quot;" expression="kotlinVariable()" name="EXPR" />
<variable alwaysStopAt="false" defaultValue="" expression="EXPR" name="EXPR_COPY" />
<variable alwaysStopAt="false" defaultValue="" expression="escapeString(EXPR)" name="EXPR_COPY" />
<context>
<option name="KOTLIN_STATEMENT" value="true" />
</context>