@Override
 public void visitPyStringLiteralExpression(PyStringLiteralExpression node) {
   final Pair<PsiElement, TextRange> data =
       node.getUserData(PyReplaceExpressionUtil.SELECTION_BREAKS_AST_NODE);
   if (data != null) {
     final PsiElement parent = data.getFirst();
     final String text = parent.getText();
     final Pair<String, String> detectedQuotes = PythonStringUtil.getQuotes(text);
     final Pair<String, String> quotes =
         detectedQuotes != null ? detectedQuotes : Pair.create("'", "'");
     final TextRange range = data.getSecond();
     final String substring = range.substring(text);
     myResult.append(quotes.getFirst() + substring + quotes.getSecond());
   } else {
     ASTNode child = node.getNode().getFirstChildNode();
     while (child != null) {
       String text = child.getText();
       if (child.getElementType() == TokenType.WHITE_SPACE) {
         if (text.contains("\n")) {
           if (!text.contains("\\")) {
             myResult.append("\\");
           }
           myResult.append(text);
         }
       } else {
         myResult.append(text);
       }
       child = child.getTreeNext();
     }
   }
 }
 @Override
 public void visitElement(PsiElement element) {
   if (element.getChildren().length == 0) {
     myResult.append(element.getText());
   } else {
     super.visitElement(element);
   }
 }
 public String result() {
   return myResult.toString();
 }
 @Override
 public void visitWhiteSpace(PsiWhiteSpace space) {
   myResult.append(space.getText().replace('\n', ' ').replace("\\", ""));
 }