Fix message markup parsing for single characters

This commit is contained in:
fiaxh 2020-03-31 21:27:40 +02:00
parent 0af8526ab1
commit 1c8e15c408

View file

@ -370,7 +370,7 @@ public static string parse_add_markup(string s_, string? highlight_word, bool pa
for (int i = 0; i < markup_string.length; i++) {
string markup_esc = Regex.escape_string(markup_string[i]);
try {
Regex regex = new Regex("(^|\\s)" + markup_esc + "(\\S.*?\\S|\\S)" + markup_esc);
Regex regex = new Regex("(^|\\s)" + markup_esc + "(\\S|\\S.*?\\S)" + markup_esc);
MatchInfo match_info;
regex.match(s.down(), 0, out match_info);
if (match_info.matches()) {