"To raw string literal" intention: fix false negative with string content starts with newline symbol \n
#KT-36369 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
61d02d9ecb
commit
8baba38099
@@ -82,7 +82,7 @@ class ToRawStringLiteralIntention : SelfTargetingOffsetIndependentIntention<KtSt
|
||||
}
|
||||
|
||||
private fun hasTrailingSpaces(text: String): Boolean {
|
||||
var afterSpace = true
|
||||
var afterSpace = false
|
||||
for (c in text) {
|
||||
if ((c == '\n' || c == '\r') && afterSpace) return true
|
||||
afterSpace = c == ' ' || c == '\t'
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
// IS_APPLICABLE: false
|
||||
val v = <caret>"\n Hello, world!"
|
||||
@@ -0,0 +1,2 @@
|
||||
val v = """
|
||||
Hello, world!"""
|
||||
Reference in New Issue
Block a user