From a0ea168990ddef0fb60f56e5d33059a3396bbc86 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Fri, 12 Aug 2016 12:37:40 +0200 Subject: [PATCH] regexp: really fix boundaries --- .../intellij/lang/regexp/psi/impl/RegExpBoundaryImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RegExpSupport/src/org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl.java b/RegExpSupport/src/org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl.java index efc697665ddc..7c8be49504f9 100644 --- a/RegExpSupport/src/org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl.java +++ b/RegExpSupport/src/org/intellij/lang/regexp/psi/impl/RegExpBoundaryImpl.java @@ -31,12 +31,14 @@ public class RegExpBoundaryImpl extends RegExpElementImpl implements RegExpBound @NotNull public Type getType() { - final IElementType type = getNode().getElementType(); + final ASTNode child = getNode().getFirstChildNode(); + assert child != null; + final IElementType type = child.getElementType(); if (type == RegExpTT.CARET) { return Type.LINE_START; } else if (type == RegExpTT.DOLLAR) { return Type.LINE_END; - } else { + } else if (type == RegExpTT.BOUNDARY){ final String s = getUnescapedText(); if (s.equals("\\b")) { return Type.WORD;