fix parsing of octal characters in Python regexps (PY-2906)

This commit is contained in:
Dmitry Jemerov
2011-02-21 18:33:11 +01:00
parent 4ed294ee77
commit 1e821e1216
3 changed files with 8 additions and 1 deletions
@@ -18,7 +18,7 @@ public class PythonRegexpParserDefinition extends RegExpParserDefinition {
@NotNull
public Lexer createLexer(Project project) {
return new RegExpLexer(false, true, false);
return new RegExpLexer(false, true, false, true);
}
@Override
+3
View File
@@ -0,0 +1,3 @@
import re
re.compile(r'\302\273')
@@ -14,6 +14,10 @@ public class PyRegexpTest extends PyLightFixtureTestCase {
doTest();
}
public void testOctal() { // PY-2906
doTest();
}
private void doTest() {
myFixture.testHighlighting(true, false, false, "regexp/" + getTestName(true) + ".py");
}