back reference is two words

This commit is contained in:
Bas Leijdekkers
2014-10-22 15:27:38 +02:00
parent dfcbd14bb0
commit b69b10a65d
@@ -124,14 +124,14 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
public void visitRegExpBackref(final RegExpBackref backref) {
final RegExpGroup group = backref.resolve();
if (group == null) {
final Annotation a = myHolder.createErrorAnnotation(backref, "Unresolved backreference");
final Annotation a = myHolder.createErrorAnnotation(backref, "Unresolved back reference");
if (a != null) {
// IDEA-9381
a.setHighlightType(ProblemHighlightType.LIKE_UNKNOWN_SYMBOL);
}
}
else if (PsiTreeUtil.isAncestor(group, backref, true)) {
myHolder.createWarningAnnotation(backref, "Backreference is nested into the capturing group it refers to");
myHolder.createWarningAnnotation(backref, "Back reference is nested into the capturing group it refers to");
}
}
@@ -173,7 +173,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
*/
final RegExpGroup group = groupRef.resolve();
if (group == null) {
final Annotation a = myHolder.createErrorAnnotation(groupRef, "Unresolved backreference");
final Annotation a = myHolder.createErrorAnnotation(groupRef, "Unresolved back reference");
if (a != null) {
// IDEA-9381
a.setHighlightType(ProblemHighlightType.LIKE_UNKNOWN_SYMBOL);