void (@NotNull PsiFragment fragment) { super.visitFragment(fragment); HighlightInfo.Builder error = HighlightUtil.checkFragmentError(fragment); if (error != null) { return; } final String text = fragment.getText(); if (fragment.isTextBlock()) { int end = fragment.getTokenType() == JavaTokenType.TEXT_BLOCK_TEMPLATE_END ? text.length() - 3 : text.length() - 2; int start = findUnnecessaryTextBlockEscapes(text, 1, end); while (start >= 0) { registerErrorAtOffset(fragment, start, 2, text); start = findUnnecessaryTextBlockEscapes(text, start + 2, end); } } else { int start = findUnnecessaryStringEscapes(text, 1); while (start >= 0) { registerErrorAtOffset(fragment, start, 2, text); start = findUnnecessaryStringEscapes(text, start + 2); } } }