mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed highlighting for not closed quote PY-9617
This commit is contained in:
@@ -73,8 +73,11 @@ TRIPLE_APOS_LITERAL = {THREE_APOS} {APOS_STRING_CHAR}* {THREE_APOS}?
|
||||
%state IN_DOCSTRING_OWNER
|
||||
%{
|
||||
private int getSpaceLength(CharSequence string) {
|
||||
int i = Math.max(StringUtil.lastIndexOf(string, '"', 0, string.length()), StringUtil.lastIndexOf(string, '\'', 0, string.length()));
|
||||
return yylength()-i-1;
|
||||
String string1 = string.toString();
|
||||
string1 = StringUtil.trimEnd(string1, "\\");
|
||||
string1 = StringUtil.trimEnd(string1, ";");
|
||||
final String s = StringUtil.trimTrailing(string1);
|
||||
return yylength()-s.length();
|
||||
|
||||
}
|
||||
%}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* The following code was generated by JFlex 1.4.3 on 5/28/13 6:11 PM */
|
||||
/* The following code was generated by JFlex 1.4.3 on 5/28/13 7:15 PM */
|
||||
|
||||
/* It's an automatically generated code. Do not modify it. */
|
||||
package com.jetbrains.python.lexer;
|
||||
@@ -12,7 +12,7 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
|
||||
* on 5/28/13 6:11 PM from the specification file
|
||||
* on 5/28/13 7:15 PM from the specification file
|
||||
* <tt>/home/ktisha/IDEA/tools/lexer/../../python/src/com/jetbrains/python/lexer/Python.flex</tt>
|
||||
*/
|
||||
class _PythonLexer implements FlexLexer {
|
||||
@@ -677,8 +677,11 @@ class _PythonLexer implements FlexLexer {
|
||||
|
||||
/* user code: */
|
||||
private int getSpaceLength(CharSequence string) {
|
||||
int i = Math.max(StringUtil.lastIndexOf(string, '"', 0, string.length()), StringUtil.lastIndexOf(string, '\'', 0, string.length()));
|
||||
return yylength()-i-1;
|
||||
String string1 = string.toString();
|
||||
string1 = StringUtil.trimEnd(string1, "\\");
|
||||
string1 = StringUtil.trimEnd(string1, ";");
|
||||
final String s = StringUtil.trimTrailing(string1);
|
||||
return yylength()-s.length();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user