mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-48825 Groovy: \u000a and \u000d sequences in String literal are green
This commit is contained in:
@@ -741,6 +741,8 @@ public class GrStringUtil {
|
||||
if (index + 4 <= chars.length()) {
|
||||
try {
|
||||
int code = Integer.parseInt(chars.substring(index, index + 4), 16);
|
||||
//line separators are invalid here
|
||||
if (code == 0x000a || code == 0x000d) return false;
|
||||
c = chars.charAt(index);
|
||||
if (c == '+' || c == '-') return false;
|
||||
outChars.append((char)code);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
print '\n'
|
||||
print <error descr="Illegal escape character in string literal">'\u000a'</error>
|
||||
print <error descr="Illegal escape character in string literal">"\u000d"</error>
|
||||
print <error descr="Illegal escape character in string literal">'\y'</error>
|
||||
ptint <error descr="Illegal escape character in string literal">"\n\a\t"</error>
|
||||
print <error descr="Illegal escape character in string literal">"\n\a${x}\t"</error>
|
||||
|
||||
Reference in New Issue
Block a user