All is symbol is not have symbol fixed #28

This commit is contained in:
林万程
2023-03-27 21:36:30 +08:00
parent 27b570c7f4
commit 95d21f69ce

View File

@@ -37,7 +37,7 @@ public class Prev {
return null;
}
private static final Pattern SYMBOL_PATTERN = Pattern.compile("[" +
private static final Pattern SYMBOL_PATTERN = Pattern.compile("[^" +
":-@" +
"\\[-`" +
"{-~" +
@@ -47,9 +47,8 @@ public class Prev {
private static PsiElement refClassParent(@NotNull PsiElement element,
@NotNull Class<? extends PsiElement> refClass) {
String text = element.getText();
if (SYMBOL_PATTERN.matcher(text).find()) {
if (!SYMBOL_PATTERN.matcher(text).find()) {
return null;
}
PsiElement parent = element.getParent();
if (parent == null) {