split heighlights by special characters. fixes #3007
This commit is contained in:
parent
78b56bb904
commit
13d6885883
|
@ -45,7 +45,6 @@ import android.text.style.ForegroundColorSpan;
|
||||||
import android.text.style.StrikethroughSpan;
|
import android.text.style.StrikethroughSpan;
|
||||||
import android.text.style.StyleSpan;
|
import android.text.style.StyleSpan;
|
||||||
import android.text.style.TypefaceSpan;
|
import android.text.style.TypefaceSpan;
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -53,7 +52,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import eu.siacs.conversations.Config;
|
|
||||||
import eu.siacs.conversations.R;
|
import eu.siacs.conversations.R;
|
||||||
import eu.siacs.conversations.entities.Message;
|
import eu.siacs.conversations.entities.Message;
|
||||||
import eu.siacs.conversations.ui.text.QuoteSpan;
|
import eu.siacs.conversations.ui.text.QuoteSpan;
|
||||||
|
@ -112,6 +110,9 @@ public class StylingHelper {
|
||||||
codepoint = term.codePointAt(i);
|
codepoint = term.codePointAt(i);
|
||||||
if (Character.isLetterOrDigit(codepoint)) {
|
if (Character.isLetterOrDigit(codepoint)) {
|
||||||
builder.append(Character.toChars(codepoint));
|
builder.append(Character.toChars(codepoint));
|
||||||
|
} else if (builder.length() > 0) {
|
||||||
|
words.add(builder.toString());
|
||||||
|
builder.delete(0, builder.length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (builder.length() > 0) {
|
if (builder.length() > 0) {
|
||||||
|
|
Loading…
Reference in New Issue