mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
linear custom file type keyword parser
This commit is contained in:
+2
-2
@@ -49,7 +49,7 @@ public class KeywordParser extends TokenParser {
|
||||
}
|
||||
Pattern pattern = null;
|
||||
try {
|
||||
pattern = Pattern.compile("(" + regex + ")($|[\\W].*)", (ignoreCase ? Pattern.CASE_INSENSITIVE : 0) | Pattern.DOTALL);
|
||||
pattern = Pattern.compile("(" + regex + ")($|[\\W])", (ignoreCase ? Pattern.CASE_INSENSITIVE : 0) | Pattern.DOTALL);
|
||||
}
|
||||
catch (PatternSyntaxException e) {
|
||||
LOG.error(e);
|
||||
@@ -75,7 +75,7 @@ public class KeywordParser extends TokenParser {
|
||||
}
|
||||
|
||||
Matcher matcher = myPattern.matcher(myBuffer.subSequence(position, myBuffer.length()));
|
||||
if (!matcher.matches()) {
|
||||
if (!matcher.lookingAt()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user