IDEA-48825 Groovy: \u000a and \u000d sequences in String literal are green

This commit is contained in:
Maxim.Medvedev
2012-03-15 15:55:43 +04:00
parent 025fd4bdac
commit d713d97276
2 changed files with 4 additions and 0 deletions
@@ -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>