Minor duplication fix.

This commit is contained in:
Millesimus 2021-08-23 13:09:21 +02:00 committed by Daniel Gultsch
parent 955a6f3fe1
commit b6fe1898e7
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ public class EditMessage extends EmojiWrapperEditText {
public void insertAsQuote(String text) {
text = QuoteHelper.replaceAltQuoteCharsInText(text);
text = text.replaceAll("(\n *){2,}", "\n").replaceAll("(^|\n)(" + QuoteHelper.QUOTE_CHAR + ")", "$1$2$2").replaceAll("(^|\n)([^>" + QuoteHelper.QUOTE_CHAR + "])", "$1> $2").replaceAll("\n$", "");
text = text.replaceAll("(\n *){2,}", "\n").replaceAll("(^|\n)(" + QuoteHelper.QUOTE_CHAR + ")", "$1$2$2").replaceAll("(^|\n)([^" + QuoteHelper.QUOTE_CHAR + "])", "$1> $2").replaceAll("\n$", "");
Editable editable = getEditableText();
int position = getSelectionEnd();
if (position == -1) position = editable.length();