mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix parsing of octal characters in Python regexps (PY-2906)
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user