|
@@ -63,7 +63,7 @@ public class CSearchTextInfo {
|
|
|
String target = textPage.getText(targetTextRange);
|
|
|
target = target.replaceAll("(\\r\\n)+ ", "");
|
|
|
|
|
|
- this.stringBuilder = highlight(context, target.toLowerCase(), keyword.toLowerCase());
|
|
|
+ this.stringBuilder = highlight(context, target, keyword);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -77,7 +77,7 @@ public class CSearchTextInfo {
|
|
|
protected SpannableStringBuilder highlight(Context context, String text, String target) {
|
|
|
SpannableStringBuilder spannable = new SpannableStringBuilder(text);
|
|
|
CharacterStyle span;
|
|
|
- Pattern p = Pattern.compile(target);
|
|
|
+ Pattern p = Pattern.compile(target, Pattern.CASE_INSENSITIVE);
|
|
|
Matcher m = p.matcher(text);
|
|
|
int backGroundColor = ContextCompat.getColor(context, R.color.tools_search_result_text_highlight);
|
|
|
while (m.find()) {
|