Result (@NotNull Request req) { final String gap = req.document.getText(new TextRange(req.firstLineEndOffset + 1, req.secondLineStartOffset)); final int index = gap.indexOf('\\'); if (index >= 0) { if (req.leftElem == req.rightElem && SINGLE_QUOTED_STRINGS.contains(req.leftElem.getNode().getElementType())) { return new Result(gap.replaceFirst("\\\\\\n", ""), 0); } else { return new Result(gap.substring(0, index), 0); } } return null; }