private static StringBuilder prepareNewLiteralText(List<GrLiteral> literals) {
    String quote = !containsInjections(literals) && literals.get(0).getText().startsWith("'") ? "'''" : "\"\"\"";

    final StringBuilder buffer = new StringBuilder();
    buffer.append(quote);

    for (GrLiteral literal : literals) {
      if (literal instanceof GrLiteralImpl) {
        appendSimpleStringValue(literal, buffer, quote);
      }
      else {
        final GrStringImpl gstring = (GrStringImpl)literal;
        for (PsiElement child : gstring.getAllContentParts()) {
          if (child instanceof GrStringContent) {
            appendSimpleStringValue(child, buffer, "\"\"\"");
          }
          else if (child instanceof GrStringInjection) {
            buffer.append(child.getText());
          }
        }
      }
    }

    buffer.append(quote);
    return buffer;
  }
private static StringBuilder prepareNewLiteralText(List<GrLiteral> literals)